Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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.
Thank you for your help!
@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