Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
luzwales
Regular Visitor

How to write DAX about pareto for some value is same?

I want to get Acc value

ItemValueAcc Value
A120120
B60180
C60240
D40280
E10190
3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @luzwales 

Please check the below picture and the sample pbix file's link down below.

 

Picture1.png

 

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 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

@luzwales@Jihwan_Kim 

 

And here's why you should NEVER use SUMMARIZE for anything else but grouping:

 

All the secrets of SUMMARIZE - SQLBI

It is very useful article for me! thanks!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.