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!
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.
View solution in original post
Learn how to create your own user groups today!
Click here to read more about the November 2021 Updates!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.