powerbi

How to get PowerBI accesstoken using ADAL.JS

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-05 05:53:27
问题 I'm trying to use ADAL.js to authenticate against PowerBI in order to get an access_token and the embed_token needed to embed PowerBI reports/dashboards/tiles in a html/javascript-only "webpart". My adal-config looks like: config = { instance: 'https://login.windows.net/common/oauth2/authorize/', tenant: 'tenant.onmicrosoft.com', clientId: '05xxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx', loginResource: "https://analysis.windows.net/powerbi/api", postLogoutRedirectUri: window.location.origin,

Rolling month average in power bi dax

不羁岁月 提交于 2020-01-05 05:53:15
问题 I have these two columns: SALES_CALLSID QFQ4TA5006C2 QZPIOA18LW8A QS4GSA300PU0 ....; and MEETING_DATE 7/10/2014 12:00 3/27/2015 12:00 11/3/2015 12:00 I need the count of the first column (salesid) but this count should be a trailing twelve month average for every month, i.e. for example for July- the count of sales id of july + count of last 11 months (i.e. based on the meeting date column), similarly this measure has to be made for every other month. The "Sales Call ID" column is a text

Does Power BI parameters are exposed to Python globals

此生再无相见时 提交于 2020-01-05 05:40:25
问题 I'm working on Power BI requests with Python scripting. I'm able to get the dataset through dataset global variable, but now I'd like to be able to get the passed parameters directly in my Python script. I tried to "print" (we cannot really print directly in PowerBI so I use raise Exception(WhatIWantToDebug) in order to see my error directly in PowerBI) the globals() , which show all the globals variables declared accessible in the context of the Python script, but I'm not able to find

Filtered Measure seemingly not working

时光总嘲笑我的痴心妄想 提交于 2020-01-05 05:32:05
问题 I have this data: Then I have this donut of fruit: I have this measure to pick-up which fruit has been selected in the above donut: Selected Fruit = SELECTEDVALUE( Fruit[Fruit] ) It seems to work fine e.g. if I add this measure to a card and click Pear: Now comes the problem - I have a bar chart which has to have interactions turned off but still needs to be filtered by what has been selected in the donut - so I created this measure: Value Filtered = CALCULATE( SUM(Fruit[Value]) ,FILTER(

Filtered Measure seemingly not working

白昼怎懂夜的黑 提交于 2020-01-05 05:32:04
问题 I have this data: Then I have this donut of fruit: I have this measure to pick-up which fruit has been selected in the above donut: Selected Fruit = SELECTEDVALUE( Fruit[Fruit] ) It seems to work fine e.g. if I add this measure to a card and click Pear: Now comes the problem - I have a bar chart which has to have interactions turned off but still needs to be filtered by what has been selected in the donut - so I created this measure: Value Filtered = CALCULATE( SUM(Fruit[Value]) ,FILTER(

Inactive relationships affecting measures

随声附和 提交于 2020-01-05 04:33:11
问题 I have the following tables & relationships in our pbix report: For some obvious reasons, I need to have a relationship (non-active) between Dates[date] and Table2[T2Date]. However, doing so causes data fluctuation to measure 'Total Amount' in Table1. Here are some screenshots: Before Relationship (Dates[date] - Table2[T2Date]): After Relationship (Dates[date] - Table2[T2Date]): I need to understand why this difference is coming up and how the relationship is causing it since the measure uses

Receiving a 'Forbidden (403)' when connecting to Power BI API

半世苍凉 提交于 2020-01-04 18:37:15
问题 We've been trying to follow this Power BI article so that we can embed reports/dashboards in our SaaS product. Specifically, we're stuck at Step 3, 'Create the Embed Token.' We're able to obtain an bearer token just fine but when the request to retrieve the reports is ultimately submitted to the API we receive: Operation returned an invalid status code 'Forbidden' private static string clientId = "..."; private static string secretKey = "..."; private static string groupId = "..."; static

Receiving a 'Forbidden (403)' when connecting to Power BI API

蹲街弑〆低调 提交于 2020-01-04 18:35:50
问题 We've been trying to follow this Power BI article so that we can embed reports/dashboards in our SaaS product. Specifically, we're stuck at Step 3, 'Create the Embed Token.' We're able to obtain an bearer token just fine but when the request to retrieve the reports is ultimately submitted to the API we receive: Operation returned an invalid status code 'Forbidden' private static string clientId = "..."; private static string secretKey = "..."; private static string groupId = "..."; static

DAX: How do I write an IF statement to return a calculation for multiple (specific) values selected?

喜你入骨 提交于 2020-01-04 13:59:07
问题 This is driving me nuts. Let's say we want to use a slicer which has two distinct values to choose from a dimension. There is A and B. Let us also say that my Fact table is connected to this dimension, however it has the same dimension with more options. My slicer now has A, B and (Blank). No biggie. Let's now say I want to list out all of the possible calculation outcomes by selecting the slicer in a DAX formula, but in my visual I need all those outcomes to be listed in an IF() branched

powerbi embeded in .net core 1.1

别来无恙 提交于 2020-01-03 21:14:16
问题 Currently, I am trying to import powerbi packages in visual studio 2017 for my .net core 1.1 project. However, I get the following error: Install-Package : Package Microsoft.PowerBI.Core 1.1.10 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.PowerBI.Core 1.1.10 supports: net45 (.NETFramework,Version=v4.5)At line:1 char:1 Has this happened to anybody else? Do you know how to work around this and embed powerbi in the new .net core 1.1? I tried to search a lot