Forum Discussion
hitesh1607
6 years agoAdvocate II
Average on Measure
I have a measure to calculate the Rolling Count RollingMeasure = VAR MaxDate = MAX ( 'Date'[Date] ) RETURN CALCULATE ( COUNT(fctTable[ID]), fctTable[HireDate] <= MaxDate, ALL ( Date) )...
- 6 years ago
Hi hitesh1607,
Have you resolved it? If not, you could reference my way to have a try:
RollingMeasure = CALCULATE ( SUM ( 'Table'[Values] ), FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) && 'Date'[Year] = MAX ( 'Date'[Year] ) ) )Avg = AVERAGEX ( FILTER ( ALLSELECTED ( 'Date' ), 'Date'[Year] = MAX ( 'Date'[Year] ) - 1 ), [RollingMeasure] )If this can't help you, please share some sample data and expected result with us. Thanks.
hitesh1607
6 years agoAdvocate II
I am trying to use Average on a measure to get last year's result. Not sure how to do that.
I already have rolling sum but I need to calculate average Rolling SUM for last year.
Greg_Deckler
6 years agoCommunity Champion
hitesh1607 - You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008