Quantcast
Channel: All Developer posts
Viewing all 48104 articles
Browse latest View live

Re: Can the Month on Landing Page in PowerBI.com be refreshed? (Calendar Visual by MAQ Software)

$
0
0

This is a desired feature for us as well.  We would like the end user to always see the calendar showing the current time period instead of the time period that was selected when the report was saved.  It doesn't need to be the default but  if there was an option to configure the calendar to show the current period that would be very useful.


Re: Connecting to web api

$
0
0

If you go Get Data > Web Contents, you have the option of "Advanced".

This will allow you to apply Headers

 

Annotation 2019-08-26 161351.png

 

 

 

Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png

Remember to spread knowledge in the community when you can! tu.png

Power BI Embedded, report.render gives error for a dashboard

$
0
0

I recently tried to implement phased embedding over embedding. Works fine on reports, but I get a type error: report.render is not a function when I try it on a dashboard. The dashboard is still building okay, but I get the error. Has anyone else experienced this? 

Clustered Column Char adding a line that represents the total percentage and not the Average

$
0
0

Using the following data;

 

StateAmount 1Amount 2Percentage Amount 2
NSW$500,000$89,00017.80%
VIC$450,000$56,98612.66%
QLD$350,000$36,58910.45%

 

Is it possible to chart a Clustered Column Chart that uses the variable "Percentage Amount 2" as the bars but the line should be the percentage of the total of Amount 2 divided by the total of Amount 1.

 

Example: Amount 2 [$182,575] /  Amount 1 [$1,300,000] = 14.04%

 

The chart should like this;

 

chart-example.png

Re: Connecting to web api

$
0
0

Hi  

 

As   mentioned you can pass the token in the Headers,

In Power Query this will be like

Web.Contents("https://api.powerbi.com/v2.0/",[Headers=[Authorization=Bearer 412sdsx1....]])

Making much simpler you can also provide your query parameters lilke the below

Web.Contents(
    "https://data.gov.uk/api", 
    [
        RelativePath="3/action/package_search", 
        Query=
        [
            q="cows", 
            rows="20"
        ]
    ]
)

Some References:

https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/

https://eriksvensen.wordpress.com/2014/09/15/specifying-json-query-in-power-query-example-statistics-sweden/

https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/

create new custom visual extend exists visualization

$
0
0

hi power bi community

 

I'm new with custom visual, but it is posible to create new custom visual and extend from existing visualization like Matrix visualization

 

I need visualization with functionality table view, drill down, sorting at header column, masking some value with image, sub total each group and grand total, custom header background each column and row. And I see some function already have in matrix visualization.

 

thanks

header table with sort and resize

$
0
0

hi power bi community

 

I'm create simple custom visual with show a table, when i see Matrix Visualization there is feature to sorting asc or desc at header column and we can resize the column.

 

how to sort data by code? I'm add event listener in header columns but how to make the column oder asc and desc,

 

table-header-sort-resize.PNG

pbiviz package Error


Re: Single PowerBI Embedded API to call separate reports based on condition

$
0
0

Hi  

 

I think you don't need to create another REST API . As you already mentioned you can parameterize and have a condition to show based.

 

Withthis you have very small changes to your code and avoid duplications too.

Re: Web incorporation code doesn't work now . Can you help me?

Re: Azure Aanalysis tabular model better or PowerBI Data model?

update Power BI report name

$
0
0

Hi,

I have a requirement to update a report name. Can any one help me to update report name using Powershell,Rest ApI,C# language.

 

I have a report in Dev workspace through CI/CD I have to move to QC Workspace from their I have to move report to prob workspace. Here i have an issue that I have multiple clients so I have to use same report with client names.

Dev workspace(AdventureReport.pbix)--> QC workspace(AdventureReport.pbix)--> Prod workspace(client1.pbix,client2.pbix,client3.pbix)

Ref: https://community.powerbi.com/t5/Community-Blog/PowerBI-CICD-using-Azure-DevOps/ba-p/769244

I have researched a lot and don't find any solution.

 

Re: pbiviz package Error

$
0
0

And it happens even when I do not change anything in the script r file. I've also attached my visual.ts code.

script.r.png

 

/*
* Power BI Visual CLI
*
* Copyright (c) Microsoft Corporation
* All rights reserved.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the ""Software""), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
"use strict";
import powerbi from "powerbi-visuals-api";
import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions;
import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions;
import IVisual = powerbi.extensibility.visual.IVisual;
import EnumerateVisualObjectInstancesOptions = powerbi.EnumerateVisualObjectInstancesOptions;
import VisualObjectInstance = powerbi.VisualObjectInstance;
import DataView = powerbi.DataView;
import IViewport = powerbi.IViewport;
import VisualObjectInstanceEnumerationObject = powerbi.VisualObjectInstanceEnumerationObject;

import { VisualSettings } from "./settings";
import { ParseElement, ResetInjector, RunHTMLWidgetRenderer } from "./htmlInjectionUtility";

enum VisualUpdateType {
Data = 2,
Resize = 4,
ViewMode = 8,
Style = 16,
ResizeEnd = 32,
All = 62,
}

// below is a snippet of a definition for an object which will contain the property values
// selected by the users
/*interface VisualSettings {
lineColor: string;
}*/

// to allow this scenario you should first the following JSON definition to the capabilities.json file
// under the "objects" property:
// "settings": {
// "displayName": "Visual Settings",
// "description": "Visual Settings Tooltip",
// "properties": {
// "lineColor": {
// "displayName": "Line Color",
// "type": { "fill": { "solid": { "color": true }}}
// }
// }
// }

// in order to improve the performance, one can update the <head> only in the initial rendering.
// set to 'true' if you are using different packages to create the widgets
const updateHTMLHead: boolean = false;
const renderVisualUpdateType: number[] = [
VisualUpdateType.Resize,
VisualUpdateType.ResizeEnd,
VisualUpdateType.Resize + VisualUpdateType.ResizeEnd
];

export class Visual implements IVisual {
private rootElement: HTMLElement;
private headNodes: Node[];
private bodyNodes: Node[];
private settings: VisualSettings;

public constructor(options: VisualConstructorOptions) {
if (options && options.element) {
this.rootElement = options.element;
}
this.headNodes = [];
this.bodyNodes = [];
}

public update(options: VisualUpdateOptions): void {

if (!options ||
!options.type ||
!options.viewport ||
!options.dataViews ||
options.dataViews.length === 0 ||
!options.dataViews[0]) {
return;
}
const dataView: DataView = options.dataViews[0];
this.settings = Visual.parseSettings(dataView);

let payloadBase64: string = null;
if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
payloadBase64 = dataView.scriptResult.payloadBase64;
}

if (renderVisualUpdateType.indexOf(options.type) === -1) {
if (payloadBase64) {
this.injectCodeFromPayload(payloadBase64);
}
} else {
this.onResizing(options.viewport);
}
}

public onResizing(finalViewport: IViewport): void {
/* add code to handle resizing of the view port */
}

private injectCodeFromPayload(payloadBase64: string): void {
// inject HTML from payload, created in R
// the code is injected to the 'head' and 'body' sections.
// if the visual was already rendered, the previous DOM elements are cleared

ResetInjector();

if (!payloadBase64) {
return;
}

// create 'virtual' HTML, so parsing is easier
let el: HTMLHtmlElement = document.createElement("html");
try {
el.innerHTML = window.atob(payloadBase64);
} catch (err) {
return;
}

// if 'updateHTMLHead == false', then the code updates the header data only on the 1st rendering
// this option allows loading and parsing of large and recurring scripts only once.
if (updateHTMLHead || this.headNodes.length === 0) {
while (this.headNodes.length > 0) {
let tempNode: Node = this.headNodes.pop();
document.head.removeChild(tempNode);
}
let headList: NodeListOf<HTMLHeadElement> = el.getElementsByTagName("head");
if (headList && headList.length > 0) {
let head: HTMLHeadElement = headList[0];
this.headNodes = ParseElement(head, document.head);
}
}

// update 'body' nodes, under the rootElement
while (this.bodyNodes.length > 0) {
let tempNode: Node = this.bodyNodes.pop();
this.rootElement.removeChild(tempNode);
}
let bodyList: NodeListOf<HTMLBodyElement> = el.getElementsByTagName("body");
if (bodyList && bodyList.length > 0) {
let body: HTMLBodyElement = bodyList[0];
this.bodyNodes = ParseElement(body, this.rootElement);
}

RunHTMLWidgetRenderer();
}

private static parseSettings(dataView: DataView): VisualSettings {
return VisualSettings.parse(dataView) as VisualSettings;
}

/**
* This function gets called for each of the objects defined in the capabilities files and allows you to select which of the
* objects and properties you want to expose to the users in the property pane.
*
*/
public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions):
VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options);
}
}

Re: Is there any way to stop "Microsoft Power BI" and the url from being added to a prin

$
0
0

Thanks. It looks like I'll have to live with it for now.

How do I alter data display based on security?

$
0
0

I have a table that displays employee data, some of which is sensitive.  We want to hide the employee name for users who don't have the proper security.  I already have the following datasources.  I am just not sure how to link them together to get the results I want.

Employee Data:  
NameSalaryPayGroup
Jane Doe200001
John Doe150002
Jim Smith100003
Joe Shmoe50004
Tom Thumb250001

   

Current User Name:
UserName
=USERNAME()

   

User Security Info: 
UsernamePayGroup
mydomain\Donald1
mydomain\Donald2

 

I have 2 users in my example - Donald and Nancy.  When they view the report, the table should look like so:

User Donald should see:
Employee NameSalary
Jane Doe20,000
John Doe15,000
Tom Thumb25,000
*****15,000

   

User Nancy should see:
Employee NameSalary
*****75,000

 

Any ideas?


Re: Programatically start/stop Azure PowerBI capacity for PowerBI Embedded

Data Flow: Get Data Sources

$
0
0

I'm trying to get the data sources for a Data Flow using the GetDataflowDatasourcesAsAdmin API, but when I call it I get two entries for each data source. The connection details are identical, but they have different data source id and gateway id. How can I know which one is the "real" one? 

 

And also, if I add a new entity (with a new data source) to a data flow, but cancel before I have saved the changes, I still get two entries for that data source, even if it is not used by the data flow. Why?

 

Thanks for any input!

Re: streaming dataset with API how to filter by user id/row level security

$
0
0

Hi! any finding on this? I am interested as well for a simil scenario with a dataset build with Stream Analytics.

Thanks


Handling single report for multi tenant data source

$
0
0

I'm trying to create one general report which can handle multiple tenant databases since we are giving same type of report for multiple customers, can some please help me with the proper guide so that I can proceed further.

 

Thanks in Advance

Dashboard/reports embedding in Dynamics 365

$
0
0

Hi,

 

If I add a new PBI dashboard in dynamics365 dashboard page, how is the connection established? Could someone please explain on a deeper technical level on how it's connecting. A client of mine would like to know due to their security policyies.

 

And a follow up question: Is it only possible to add PBI reports to D365 from PBI service or is it possible to embedd it from PBI report server also?

 

BR

Viewing all 48104 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>