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
samantha75
Frequent Visitor

add alternative date filters for week , month

Hi All

Is there a way to add multiple date filters such as date range, month, week in separate slicer or drop downs and when a user selects one it clears other filters and shows the data filtered by the last selected filter? For example, first the user select a week - say week 41 and data is now filtered to week 41. Then the user selects a different filter for the month and selects July 2022 , now only show data for July 2022 and clear the week filter. Essentially having multiple OPTIONS to filter date-based data.

Thanks

1 REPLY 1
amitchandak
Super User
Super User

@samantha75 , You have create a table joined to you date table which basically an unpivoted version and use that

 

union(

selectcolumns(Date, "Date", [Date], "Period", "Week", "Value", [Week No], "Sort", [Week Sort]),
selectcolumns(Date, "Date", [Date], "Period", "Month", "Value", [Month Year], "Sort", [Month Sort])
)

 

Join the with date , force Many to Many and filter direction from this table to date table. 

 

then use this table in the slicer, If needed make a hierarchical slicer

 

Approach is very similar to

Power BI - Show Grand total row or Avg Grand total row in Visual: https://youtu.be/OSwRZ4GUhxc

 

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.