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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
DataNinja777
Super User
Super User

Variance commentary using contanatenteX sorting large to small balance commentaries

Hi Power BI Community,

 

I am trying to automate my variance analysis commentary, and I'd greatly appreciate it if you could let me know how I can rank the variance comments by the measure [Stock value variance] by the Material code.  I think it will be using RankX or something similar to that, but I cannot think of quickly how to incorporate RankX in the below code. 

DataNinja777_1-1701235631544.png

Thank you for your help!

1 REPLY 1
swikritee_p
Resolver II
Resolver II

@DataNinja777 , Check if below measure can help 

 

Measure = Rank(dense,  allselected('material Master'[Material code]), orderby( [Stock value variance])) 

 

Assumed that  [Stock value variance] is a measure 

https://learn.microsoft.com/en-us/dax/rank-function-dax

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors