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
DebbieE
Community Champion
Community Champion

Calculated Columns and X e.g. RANKX

I have found a calculated column that does this

Ranking = RANKX(ALL(Products),Products[TotalSales])
 
But because its a calculated column, surely it just needs to be 
 
Ranking = RANK(Products[TotalSales])
 
Are the X functions specifically for measures? 
 
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

It is not that X columns can not be used in the column.  I have used them quite a few times

please Refer :https://exceleratorbi.com.au/use-sum-vs-sumx/

https://radacad.com/sum-vs-sumx-what-is-the-difference-of-the-two-dax-functions-in-power-bi

 

minx,Maxx,sumx come pretty handy to get data from the same table based on some condition using earlier. And also work as alternate lookupvalue to get value from another table .

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-xuding-msft
Community Support
Community Support

Hi @DebbieE ,

Please take a look at the blogs about the function of RANKX. Other functions like MINX, MAXX, SUMX and so on are the same logical as RANKX. Hope they can help you understand clearly.

How to use RANKX in DAX (Part 1 of 3 – Calculated Columns) 

How to use RANKX in DAX (Part 2 of 3 – Calculated Measures) 

How to use RANKX in DAX (Part 3 of 3 – The Finale)

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xuding-msft
Community Support
Community Support

Hi @DebbieE ,

Please take a look at the blogs about the function of RANKX. Other functions like MINX, MAXX, SUMX and so on are the same logical as RANKX. Hope they can help you understand clearly.

How to use RANKX in DAX (Part 1 of 3 – Calculated Columns) 

How to use RANKX in DAX (Part 2 of 3 – Calculated Measures) 

How to use RANKX in DAX (Part 3 of 3 – The Finale)

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

It is not that X columns can not be used in the column.  I have used them quite a few times

please Refer :https://exceleratorbi.com.au/use-sum-vs-sumx/

https://radacad.com/sum-vs-sumx-what-is-the-difference-of-the-two-dax-functions-in-power-bi

 

minx,Maxx,sumx come pretty handy to get data from the same table based on some condition using earlier. And also work as alternate lookupvalue to get value from another table .

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors