Forum Discussion

Luggruff's avatar
Luggruff
Frequent Visitor
4 years ago
Solved

Cumulative daily average in selected range

I am trying to figure out how to present cumulative average per day for a measure, based on the dates selected in a slicer. However, none of the examples I manage to Google quite fits.   So I want ...
  • Luggruff's avatar
    Luggruff
    4 years ago

    Nice! Thanks. It almost worked, although close enough. I had to switch ALL to ALLSELECTED, like so:

    From:
    Process Score = CALCULATE( CALCULATE(
    AVERAGE(fact__scores[Process score]),
    USERELATIONSHIP(dim_Calendar[date],fact_scores[Handle Date])
    ), Filter( all(dim_Calendar) , dim_Calendar[date] <= max(dim_Calendar[date]) )  )

    To:
    Process Score = CALCULATE( CALCULATE(
    AVERAGE(fact__scores[Process score]),
    USERELATIONSHIP(dim_Calendar[date],fact_scores[Handle Date])
    ), Filter( ALLSELECTED(dim_Calendar) , dim_Calendar[date] <= max(dim_Calendar[date]) )  )

    End result:

     



    If you want to update the answer, I will mark it as the solution.