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
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
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.