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
Power_MN
Helper I
Helper I

RANKX with Time Slicer (between)

Hello everybody, i'm facing a problem with the RANKX funktion and slicers. The functions works absolutely fine with dropdown slicers (Year, Month, Week). But if want to use the "between slicer", the function do not work anymore. Rank = RANKX(ALLSELECTED(Data[Product]),[Score],,DESC) Has anyone had the same problem and knows a solution? Kind regards
2 REPLIES 2
amitchandak
Super User
Super User

@Power_MN , This should work with both. are you using some date context in score ?

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

@amitchandak it is difficult to share a example, because the dataset is very complicated with many joins and sensitive information etc. Maybe you can check the measure of "score", if there is something wrong. Otherwise I have to prepare some samples of the data. Here is the measure for the "score". The "score" is a classic weighted scoring model. The measure refers to one table. Score = -- definition weighting -- VAR price = 40 VAR punctuality = 25 VAR claim = 25 VAR goal = 10 -- Points for punctuality -- VAR points_of_punctuality = ([Average punctuality]*100)/ (CALCULATE (SUMX (VALUES(Data[Name]),[Average punctuality]), ALLSELECTED(Data) ) ) -- Points for claim -- VAR points_of_claim = (([Average claim])*100)/ ( ( (CALCULATE (SUMX (VALUES(Data[Name]),[Average claim]), ALLSELECTED(Data) ) ) ) ) -- Points for goal -- VAR points_of_goal = IF(Data[goal]<=7,100,50) -- Points for price -- VAR points_of_price = IF (CALCULATE (DISTINCTCOUNT(Data[Name])=1 && [Average price]<0, ALL(Data[Name]) ),100, IF(CALCULATE (DISTINCTCOUNT(Data[Name])=1 && [Average price]>0, ALL(Data[Name]) ),0, ([Average price]-[Max price])/(([Max price]-[Min price)/100)*(-1) ) ) -- Final Score with weighting -- VAR Final_Score = points_of_price*price+points_of_claim*claim+points_of_punctuality*punctuality+points_of_goal*goal RETURN Final_Score Thank you very much for your support!! Kind regards

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.