Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Date Difference Calculation with what if parameters

Hello,   I am trying to calculate totals based on a what if parameter that filters by days selected within the "what if" parameter.   Therefore as per the below picture, I have selected March 11 ...
  • amitchandak's avatar
    4 years ago

    Anonymous , if you select a date and you need data more than data you need to have slicer on independent date

     

    //Date1 is independent Date table, Date is joined with Table
    new measure =
    var _max1 = maxx(allselected(Date1),Date1[Date])
    var _min = _max1

    var _max =_max1 + [What if meausre]
    return
    calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))