Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Compare values from multiple years in column chart

Hi,   I am working on a report which has clients' data from 2020 and 2021, specifed by the column 'Year'. I want to compare data from the same clients across 2 years in one chart, but if I choose 2...
  • amitchandak's avatar
    4 years ago

    Anonymous , First of for this you need a separate year/date table joined to thsi table

     

    second, you can use min and max values

     

    new measure =
    var _max = maxx(allselected(Date),Date[Year])
    var _min = minx(allselected(Date),Date[Year])
    return
    calculate( sum(Table[Value]), filter('Table', 'Table'[Date] =_max ))  - calculate( sum(Table[Value]), filter('Table', 'Table'[Date] =_min ))

     

     

    Of if you need two date slicers

     

    How to use two Date/Period slicers

    https://youtu.be/WSeZr_-MiTg