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: Can the Month on Landing Page in PowerBI.com be refreshed? (Calendar Visual by MAQ Software)
Re: Connecting to web api
If you go Get Data > Web Contents, you have the option of "Advanced".
This will allow you to apply Headers
Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!
Stay up to date on
Read my blogs on
Remember to spread knowledge in the community when you can!
Power BI Embedded, report.render gives error for a dashboard
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
Using the following data;
State | Amount 1 | Amount 2 | Percentage Amount 2 |
NSW | $500,000 | $89,000 | 17.80% |
VIC | $450,000 | $56,986 | 12.66% |
QLD | $350,000 | $36,589 | 10.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;
Re: Connecting to web api
Hi
As
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/2014/03/26/working-with-web-services-in-power-query/
create new custom visual extend exists visualization
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
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,
pbiviz package Error
I am trying to add tooltip to my R visual. I tried following some tutorials such as
https://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1
https://towardsdatascience.com/custom-html-visuals-in-power-bi-using-r-2b0494894ff
But when I tried 'pbiviz package' in node, I got the following error message. It took me many days but I am still able to find a solution.
Re: Single PowerBI Embedded API to call separate reports based on condition
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?
Hi
This was already asked several times
https://community.powerbi.com/t5/Developer/secure-embed-power-BI-report/td-p/772774
This is due to issue with microsoft which already reported
tps://community.powerbi.com/t5/Issues/iFrame-Embed-Issue/idi-p/763366
For now use the first embed url and paste in the iframe. (Don't use the IFRAME URL)
Re: Azure Aanalysis tabular model better or PowerBI Data model?
Hi All,
Seems like i found the answer to be above question, please add any more info if you have.
https://sqlserverbi.blog/2019/08/24/power-bi-project-good-and-best-practices/
https://sqlserverbi.blog/2018/12/13/data-model-options-for-power-bi-solutions/
Thanks,
Abhishek
update Power BI report name
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
And it happens even when I do not change anything in the script r file. I've also attached my visual.ts code.
/*
* 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
Thanks. It looks like I'll have to live with it for now.
How do I alter data display based on security?
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: | ||
Name | Salary | PayGroup |
Jane Doe | 20000 | 1 |
John Doe | 15000 | 2 |
Jim Smith | 10000 | 3 |
Joe Shmoe | 5000 | 4 |
Tom Thumb | 25000 | 1 |
Current User Name: |
UserName |
=USERNAME() |
User Security Info: | |
Username | PayGroup |
mydomain\Donald | 1 |
mydomain\Donald | 2 |
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 Name | Salary |
Jane Doe | 20,000 |
John Doe | 15,000 |
Tom Thumb | 25,000 |
***** | 15,000 |
User Nancy should see: | |
Employee Name | Salary |
***** | 75,000 |
Any ideas?
Re: Programatically start/stop Azure PowerBI capacity for PowerBI Embedded
I found the REST api documented here. It seems to be working fine.
Data Flow: Get Data Sources
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
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
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
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