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

filtering chart or grid with dax

 

how to filter chart or grid with dax exp ?

is not an option in advance filtring of a page or report !!

for example last 6 weeks on sanday only   >> on axis chart or filtring  grid rows ??

 

 

1 REPLY 1
dearwatson
Responsive Resident
Responsive Resident

Hi Ben,

 

Yeah there's no expression based filtering right now.. dont get me started on being able to filter by "This Week" or as you put it "In the last 6 Weeks" which has long been a shortcoming of Power BI.

 

The best way around this right now is to create a calculated column based on the expression e.g. create a column 

"Is in last 6 weeks on a Sunday" = IF(Table[Date]>DATEDIFF(TODAY(),-6,WEEK)&&(Table[DayName]="Sunday", TRUE(),FALSE())

(I didn't check this DAX syntax so apologies if there is mistakes, just an example)

 

Then I filter the page or report based on that column... its a crude way to do it but the only solution right now.

 

"The commonality between science and art is in trying to see profoundly - to develop strategies of seeing and showing." - Edward Tufte

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.