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
GeraSanz11
Frequent Visitor

Ranking based on measures

Hi everyone!

 

im having some issues with rank funcitions. First of all, my data table its related with a Date table and Clients info.

 

The left side is the data table and the right side is the idea of what i need

 

So i want to create a table that displays sales by client, depending on the filter selected, year and quarter, as well as the accumulated sales of the selected period, and rank them both depending on the amount

 

As you can see in the image below, Client B sales were $100 in 4Qtr of 2017, ranking 2, since it sales were lower than Clien A, but the accumulated sales (sums the sales of the current year selected and Qtr <= to selected Qtr, in this case 3) , Client B ranks 1 since in the accumulative sales he did better than Client A...

 

 

 

 

Captura.PNG

 

 

So far i managed to calculate the accumulated sales with a measure so i have a data table with the first 3 columns (sales, rank sales, and accum sales) 

 

but not a single formula seems to work, i tryed to rank by Accum measure but it returns the same rank as the sales value

 

Any ideas? 

 

1 ACCEPTED SOLUTION
GeraSanz11
Frequent Visitor

In hopes that this helps anyone, i found a way to do the rank,

 

Instead of calling the measure accum, i used the formula directly in the rank

 

 Hopes this helps anyone 

View solution in original post

1 REPLY 1
GeraSanz11
Frequent Visitor

In hopes that this helps anyone, i found a way to do the rank,

 

Instead of calling the measure accum, i used the formula directly in the rank

 

 Hopes this helps anyone 

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.