Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rswami_4
Helper I
Helper I

Changing filtering sequence in Power BI

I have a table that looks like this:

 

MyTable  
MyColumn1MyColumn2MyColumn3
10-AugValue 1X
10-AugValue 2 
10-AugValue 1X
11-AugValue 1 
11-AugValue 2X
12-AugValue 1X

 

I have a slicer on MyColumn2 (contains two values - Value 1 and Value 2)

 

I have a calculated column that looks like:

 

MyColumn 4 = COUNTROWS(
FILTER('MyTable' ,
 'MyTable'[MyColumn3] = "X" && 'MyTable'[MyColumn1] <= earlier('MyTable'[MyColumn1])
)
)

 

I need the slicer filter (on MyColumn2) to apply before the DAX Filter (MyColumn3) applies.  Otherwise the results are very different.  How can I make it happen?

1 ACCEPTED SOLUTION
jahida
Impactful Individual
Impactful Individual

Using columns, it's not possible, since PowerBI evaluates columns once at refresh, not live. Consider using measures instead. In this case, I think you could just replace the "earlier" with "MAX", wrap the first instance of 'MyTable' with an ALL(), and use exactly the same formula as a measure.

View solution in original post

1 REPLY 1
jahida
Impactful Individual
Impactful Individual

Using columns, it's not possible, since PowerBI evaluates columns once at refresh, not live. Consider using measures instead. In this case, I think you could just replace the "earlier" with "MAX", wrap the first instance of 'MyTable' with an ALL(), and use exactly the same formula as a measure.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.