Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
How would I go about setting up a table to create a weekly filter?
I have my main table with a date/time column.
The user wants to be able to have a slicer that filters visualizations for one week at a time.
I've created a separate table with the following columns:
The week starts on Monday, not Sunday.
So the user wants a slicer to filter data from Monday - Sunday. The slicer would have dates like
1/2/2023
1/9/2023
1/16/2023
....
but when a date is chosen, the table/visualizations display data from 1/2/2023 - 1/8/2023, 1/9/2023 - 1/15/2023, 1/16/2023 - 1/22/2023.....
Hi @Anonymous
You can refer to the following sample
Sample data
Another data table
Based on the slicer you have offered, it display the date of Sunday, so create a measure
Measure = IF(ISFILTERED('Table (3)'[Date]),IF(SELECTEDVALUE('Table 2'[Date])-WEEKDAY(SELECTEDVALUE('Table 2'[Date]),2)+1=SELECTEDVALUE('Table (3)'[Date])+1,1,0),1)
Then put the measure to the table visual filter
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
90 | |
78 | |
71 | |
64 |
User | Count |
---|---|
112 | |
96 | |
95 | |
67 | |
65 |