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
Faber13
Helper II
Helper II

Ranking filtros

I need to create a ranking disregarding the days that are with 0 and disregarding the saturdays, how do I do it?

 


in the case below it would have to go to position 56 only (I'm not ignoring Saturdays, but I need to)

 

rankingranking

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Faber13 ,

 

Firstly you need a measure to get the weekday:

 

Weekday = WEEKDAY(MAX('Table'[Date]),2)

 

Then you could use IF() to filter out Saturday and [Total] =0 (set blank), and then rank the rest values:

 

Rank = IF([Weekday]=6 && [Total Pallets]=0 ,BLANK(),RANKX(FILTER(ALL('Table'),[Weekday]<>6 && [Total Pallets]<>0), [Total Pallets],,DESC,Dense) )

Output:

 

Eyelyn9_0-1644218460045.png

 

 

Best Regards,
Eyelyn Qin
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

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @Faber13 ,

 

Firstly you need a measure to get the weekday:

 

Weekday = WEEKDAY(MAX('Table'[Date]),2)

 

Then you could use IF() to filter out Saturday and [Total] =0 (set blank), and then rank the rest values:

 

Rank = IF([Weekday]=6 && [Total Pallets]=0 ,BLANK(),RANKX(FILTER(ALL('Table'),[Weekday]<>6 && [Total Pallets]<>0), [Total Pallets],,DESC,Dense) )

Output:

 

Eyelyn9_0-1644218460045.png

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Faber13
Helper II
Helper II

I need it not to consider the rows that have a value of 0 and also that it is not Saturday (I have a column calculated with the days)

 

Faber13_0-1643640271797.png

 

amitchandak
Super User
Super User

@Faber13 , In case rank is on [Total Pallet] try like

rankx(filter(allselected(Table[Date]), [Total Pallet]>0 ), [Total Pallet],,desc,dense)

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.