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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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 .

 

 

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 .

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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