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.
I am trying to create a filter for a required date field in my table. We want to see all sales based on the required date. This filter will include the last 8 weeks, today, and 365 days from today.
I have a Calendar table setup in my model already but unsure how to relate them together to my 'Sales Orders'[Required Date] column.
Thank you for any help on this!
Solved! Go to Solution.
Hi @MP-iCONN ,
Create a table that contains 3 rows: last 8 weeks, today, and 365 days from today.
Use this table as slicer.
Create 3 measure:
measure1 = return 1 if the dates in sales table are in last 8 weeks, else rerutn 0.
measure2 = return 1 if the dates in sales table is today, else rerutn 0.
measure3 = return 1 if the dates in sales table are in last 365 days, else rerutn 0.
Create an additional measure:
Swith(selectedvalue([slicer]),"last 8 weeks",measure1,"today",[measure2],"365 days from today",[measure3],0)
Then add this measure to visual filter which value = 1.
Best Regards,
Jay
Hi @MP-iCONN ,
Create a table that contains 3 rows: last 8 weeks, today, and 365 days from today.
Use this table as slicer.
Create 3 measure:
measure1 = return 1 if the dates in sales table are in last 8 weeks, else rerutn 0.
measure2 = return 1 if the dates in sales table is today, else rerutn 0.
measure3 = return 1 if the dates in sales table are in last 365 days, else rerutn 0.
Create an additional measure:
Swith(selectedvalue([slicer]),"last 8 weeks",measure1,"today",[measure2],"365 days from today",[measure3],0)
Then add this measure to visual filter which value = 1.
Best Regards,
Jay
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |