Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am trying to create a DAX measure with following table.
Column A | Column B | Column C | Date | Value |
1 | 1 | P1 | 10/26/2017 | 10 |
1 | 1 | P1 | 10/27/2017 | 20 |
1 | 3 | P3 | 10/28/2017 | 10 |
2 | 2 | P1 | 10/29/2017 | 15 |
2 | 2 | P2 | 10/30/2017 | 25 |
I want to dislpay the following grid data.
Column A | Column B | Value |
1 | 1 | 20 |
1 | 3 | 10 |
2 | 2 | 40 |
The measure is calculated as follows: It is a 2 step aggregation
Get the max value for each of the first 3 column values. i.e after the 1st aggregation the result would look like:
Column A | Column B | Column C | Value |
1 | 1 | P1 | 20 |
1 | 3 | P3 | 10 |
2 | 2 | P1 | 15 |
2 | 2 | P2 | 25 |
Now sum it over first 2 columns to get the final result which is:
Column A | Column B | Value |
1 | 1 | 20 |
1 | 3 | 10 |
2 | 2 | 40 |
Help me in creating the DAX measure which would result in the above data when I create a table visual in Power BI. Thanks in advance..
Solved! Go to Solution.
You can try
sum = VAR first_agg_tbl = SUMMARIZE ( yourTable, yourTable[Column C], "Max of each column C", MAX ( yourTable[Value] ) ) RETURN SUMX ( first_agg_tbl, [Max of each column C] )
You can try
sum = VAR first_agg_tbl = SUMMARIZE ( yourTable, yourTable[Column C], "Max of each column C", MAX ( yourTable[Value] ) ) RETURN SUMX ( first_agg_tbl, [Max of each column C] )
Thank you Eric. It was working great..
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |