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
Anonymous
Not applicable

Filtering by Ranked List

I am trying to find out customer volatility by subtracting lowest volume month from highest volume month. I would like to do this by using a variable to create a ranking, then

Calculate(counta(volume) , filter( table , [rankvar] = 1)) - Calculate(counta(volume) , filter( table , [rankvar] = max(monthnum))

But I cannot filter by a variable since there is no row context. What can I do?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

What I was trying to do, which was basically filter month by a measure that ranked months based on volume, was not possible. Instead I made a measure to calculate percent change month-over-month and then multiply this by the previous month's volume.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.

 

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.
Anonymous
Not applicable

What I was trying to do, which was basically filter month by a measure that ranked months based on volume, was not possible. Instead I made a measure to calculate percent change month-over-month and then multiply this by the previous month's volume.

v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

I create a sample with the highest volume minus the lowest minus directly. You can have a try.

 

  1. Create a calculated column to calculate the total values of each months.
sum = CALCULATE(SUM('Table'[volume]),ALLEXCEPT('Table','Table'[Date].[Month]))

1.jpg

 

  1. Create a measure
Measure =
var a = MAX('Table'[sum])
var b = MIN('Table'[sum])
return a-b

2.jpg

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.

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.