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.
I want to get Acc value
Item | Value | Acc Value |
A | 120 | 120 |
B | 60 | 180 |
C | 60 | 240 |
D | 40 | 280 |
E | 10 | 190 |
Hi, @luzwales
Please check the below picture and the sample pbix file's link down below.
Acc value measure =
VAR rankbyitem =
RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Item] ) ),, ASC )
VAR rankbyvalue =
RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Value] ) ),, DESC )
VAR currentrankcombination =
RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Item] ) ),, ASC )
+ 100 * RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Value] ) ),, DESC )
VAR newtable =
FILTER (
SUMMARIZE (
ALL ( Data ),
Data[Item],
Data[Value],
"@rankbyitem", RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Item] ) ),, ASC ),
"@rankbyvalue", RANKX ( ALL ( Data ), CALCULATE ( MAX ( Data[Value] ) ),, DESC )
),
[@rankbyitem] + 100 * [@rankbyvalue] <= currentrankcombination
)
RETURN
IF ( ISFILTERED ( Data[Item] ), SUMX ( newtable, Data[Value] ) )
https://www.dropbox.com/s/rc0rohk7fb880ww/luzwales.pbix?dl=0
And here's why you should NEVER use SUMMARIZE for anything else but grouping:
It is very useful article for me! thanks!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |