Forum Discussion
How to calculate difference between two tiles with different slicers dynamically?
- 9 years ago
Hi senescence,
To achieve this requirement, the date column added into two slicers have to come from two unrelated tables. So, in this scenario, you should create two calendar tables:
Calendar Date = CALENDAR(MIN('Test'[Date]),MAX('Test'[Date])) Calendar Date 2 = CALENDAR(MIN('Test'[Date]),MAX('Test'[Date]))Then, create three measures like below:
Count1 = CALCULATE(COUNT('Test'[Date]),FILTER('Test','Test'[Date]=MAX('Calendar Date'[Date]))) Count2 = CALCULATE(COUNT('Test'[Date]),FILTER('Test','Test'[Date]=MAX('Calendar Date 2'[Date]))) diff = [Count2]-[Count1]Add corresponding columns and measures into table visual. Notice that the date in slicer1 comes from 'Calendar Date', while date in slicer2 should come from 'Calendar Date 2'.
Best regards,
Yuliana Gu
Hi senescence,
To achieve this requirement, the date column added into two slicers have to come from two unrelated tables. So, in this scenario, you should create two calendar tables:
Calendar Date = CALENDAR(MIN('Test'[Date]),MAX('Test'[Date]))
Calendar Date 2 = CALENDAR(MIN('Test'[Date]),MAX('Test'[Date]))
Then, create three measures like below:
Count1 = CALCULATE(COUNT('Test'[Date]),FILTER('Test','Test'[Date]=MAX('Calendar Date'[Date])))
Count2 = CALCULATE(COUNT('Test'[Date]),FILTER('Test','Test'[Date]=MAX('Calendar Date 2'[Date])))
diff = [Count2]-[Count1]
Add corresponding columns and measures into table visual. Notice that the date in slicer1 comes from 'Calendar Date', while date in slicer2 should come from 'Calendar Date 2'.
Best regards,
Yuliana Gu
- senescence9 years agoFrequent Visitor
This worked perfectly and makes complete sense - thanks for your help.