Forum Discussion

wangjuan303's avatar
wangjuan303
Helper III
4 years ago
Solved

How to create measure for Compare two date different value

I need create report like this style, to compare two date Sales different :  Power bi can create report like this:  our data source is simple, single fact table, Date slicer will just c...
  • amitchandak's avatar
    4 years ago

    wangjuan303 , Using one slicer 2 selected date diff

     

    diff =
    var _max = maxx(allselected('Date'),'Date'[Date])
    var _min = minx(allselected('Date'),'Date'[Date])

    return
    calculate(sum(Table[value]), filter(date, Date[Date] =_max)) - calculate(sum(Table[value]), filter(date, Date[Date] =_min))

     

     

    or refer

    How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg

  • wangjuan303's avatar
    wangjuan303
    4 years ago

    Thank you so much, It is nice solution,