Forum Discussion
sakamotothais
Helper III
9 years agoDynamic filter for a measurement
Hi I have a measure with today's date D 0 and a measure with yesterday's date D -1. How can I get dynamic when I filter a date on a slicer? For example, when selecting on filter day 26 bring...
v-caliao-msft
Microsoft Employee
9 years ago
Please refer to the steps below to achieve your requirement.
- Create a date table, and do not create relationship between this date table and your original table.
Table = CALENDAR(DATE(2017,4,1),DATE(2017,6,30)) - Create a measure in your original table.
Measure =
var selectitemed = MAX('Table'[Date])
return IF((1*(MAX(Table1[Date])-selectitemed)=0||1*(MAX(Table1[Date])-selectitemed)=-1),1,0) - Add this measure to your visual filter like below.
Result.
Regards,
Charlie Liao
- sakamotothais9 years ago
Helper III
Thanks for the example, it worked well.
But it still is not what I need.
I need to separate. A measure that contains today's date, and a measure that contains yesterday's date according to the date filter.
Then check the variance in the graphs between the two results.Thanks