Forum Discussion

senescence's avatar
senescence
Frequent Visitor
9 years ago
Solved

How to calculate difference between two tiles with different slicers dynamically?

Hi,   I suspect there is no solution to this but here goes:   I have data in a table as follows:   High, 01/09/17 High, 01/09/17 Medium, 01/09/17 Low, 01/09/17 High, 02/09/17 Medium, 02/09...
  • v-yulgu-msft's avatar
    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