898 questions
5
votes
3
answers
9k
views
Return top value ordered by another column
Suppose I have a table as follows:
TableA =
DATATABLE (
"Year", INTEGER,
"Group", STRING,
"Value", DOUBLE,
{
{ 2015, "A", 2 },
{ 2015, "B", 8 },
{ 2016, "A", 9 ...
18
votes
2
answers
34k
views
Power BI: How to use Python with multiple tables in the Power Query Editor?
How can you create a new table with a Python script that uses two existing tables as input? For example by performing a left join using pandas merge?
Some details:
Using Home > Edit queries you ...
4
votes
2
answers
1k
views
How to make a reproducible data sample in PowerBI using Python?
This is a self-answered post. Why? Because many questions in Power BI go unanswered because of lacking data samples. Also, many seem to wonder how to edit data tables in Power BI using Python. And, of ...
5
votes
1
answer
3k
views
Refresh AWS RDS database from Power BI Web
I created a report in Power BI Desktop, connected to an AWS RDS database, and published it to the Power BI Web App, with an intent to refresh the dataset from the web app.
I tried doing so with both ...
21
votes
2
answers
11k
views
Scraping Data from a website which uses Power BI - retrieving data from Power BI on a website
I want to scrape data from this page (and pages similar to it): https://cereals.ahdb.org.uk/market-data-centre/historical-data/feed-ingredients.aspx
This page uses Power BI. Unfortunately, finding a ...
11
votes
1
answer
14k
views
Custom aggregate column in power bi matrix
I'm trying to create a matrix in a Power BI report summarizing Salesperson performance sliced in a number of different ways.
I know how to create a matrix with Rows - Salesperson, Columns - Product ...
2
votes
1
answer
3k
views
COUNTIF equivalent in Power BI / DAX?
I have the below table and trying to move from excel to Power Bi. In excel I use =COUNTIFS($A$2:$A$16,"<="&E2,$B$2:$B$16,">="&E2) to get Count value but I wonder how can I calculate it ...
18
votes
4
answers
13k
views
Can't get client-credentials access token to authorize Power BI
I'm trying to use the Power BI REST API, using an access token acquired with the "client credentials" method, but I keep getting 403 Forbidden on my requests.
My code follows the pattern ...
7
votes
1
answer
9k
views
Power BI: TopN and All Other
I have a data set that resembles the following:
Year Location Type Amount
2015 West Apple 12
2015 West Pear 14
2015 East Apple 55
2015 South ...
3
votes
2
answers
2k
views
Setting a dynamic domain (min and max axis) in Vega-Lite (Deneb)
Another week, another Vega-lite question I´m turning to you guys.
It´s actually pretty easy to create KPI cards in Deneb however what´s causing me headache is the positioning of marks.
As you can see ...
10
votes
1
answer
115k
views
Creating an index column for Power Bi
I have a table of member IDs and transactions in Power BI, I would like to create an index column for it, any suggestions?
Regards
6
votes
1
answer
11k
views
Filter SUMMARIZECOLUMNS
How to construct filter tables for SUMMARIZECOLUMNS function?
The SUMMARIZECOLUMNS has the following pattern:
SUMMARIZECOLUMNS(
ColumnName1, ...
ColumnNameN,
FilterTable1, -- my ...
5
votes
2
answers
775
views
Power BI Dashboard where the core filter condition is a disjunction on numeric fields
We are trying to implement a dashboard that displays various tables, metrics and a map where the dataset is a list of customers. The primary filter condition is the disjunction of two numeric fields. ...
1
vote
1
answer
3k
views
Finding cummulative sum of MAX values
I need to calculate the cumulative sum of Max value per period (or per category). See the embedded image.
So, first, I need to find max value for each category/month per year. Then I want to ...
1
vote
1
answer
1k
views
Get Authorization code for Azure PowerBI capacity for PowerBI Embedded
I'm programatically start/stop Azure PowerBI capacity for PowerBI Embedded.
On button click , resume/suspend the powerbi embed service in Azure. I followed below link to do this.
https://learn....
21
votes
5
answers
73k
views
How to use SQL Server stored procedures in Microsoft PowerBI?
I want to generate reports from my SQL Server tables.
I have some already made stored procedures that I would like to use to generate reports from.
I haven't found a way to do so.
Only by ...
16
votes
2
answers
3k
views
Force DAX SWITCH function to use strict (lazy) short-circuit evaluation
Set up:
Similar to this question on a MSDN forum, I have a measure that switches between various other measures (some of them much more complex than others). The measure looks like this (my actual ...
10
votes
3
answers
16k
views
Multiple Linear Regression in Power BI
Suppose I have a set of returns and I want to compute its beta values versus different market indices. Let's use the following set of data in a table named Returns for the sake of having a concrete ...
9
votes
1
answer
13k
views
Data scraping from published Power BI visual
How to import data in any programming way from published specific Power BI visual to another PBI report or SQL Server table or just scrap it to local drive? I would like to achieve the same effect as ...
7
votes
3
answers
9k
views
Custom Authentication in PowerBI
I'm looking a solution to combine Power BI authentication and a web application.
We authenticate our users using existing web application and let them see the dashboard and reports in Power BI portal, ...
6
votes
3
answers
29k
views
Select row with MAX value per category Power BI
How to select row with max value per category in M of Power BI. Suppose we have table:
+----------+-------+------------+
| Category | Value | Date |
+----------+-------+------------+
| apples ...
5
votes
2
answers
5k
views
REMOVEFILTERS not doing what I expected in Power BI
Hi I have the following data and am trying to return a distinctcount of the number of Teams irrespective of what teams are filtered to, but taking into account the filters applied to Client.
i'm ...
4
votes
1
answer
15k
views
DAX REMOVEFILTERS vs ALL
How to substitute REMOVEFILTERS in the following code with old school functions ALL and VALUES instead? This exercise is just to better understand REMOVEFILTERS.
CALCULATETABLE (
-- get all ...
3
votes
1
answer
3k
views
How to calculate inventory per day from movement table with Power BI DAX?
I have a table with inventory movements. Each inventory item has a unique ID and they change status overtime (let's say status A, B, C and D, but not always in this order). Each status change of an ID ...
2
votes
2
answers
1k
views
Power BI :: how to compare 2 columns on 2 different Timelines?
I've been trying to follow this guide that tells me how to compare two columns but it just doesn't work for my scenario.
This is what I have right now:
And you can download it here:
.pbix
.xlsx
My ...