Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Subract within a column applying multiple filters

Hi, I have a dataset that takes a daily snapshot of clients with measures; client count, weeks and hours. For any two given dates I want to be able to calculate the variance (most recent minus oldest...
  • amitchandak's avatar
    6 years ago

    Anonymous 

    Assuming you are using a date table selected two dates in slicer then you can have like

    Measure =
    var _min = minx('Date','Date'[Date])
    var _max = maxx('Date','Date'[Date])
    return
    calculate(sum(Table[Hours]),filter('Date','Date'[Date]=_min))- calculate(Table[Value],filter('Date','Date'[Date]=_max))