Forum Discussion
Count IF statement Annualization
I have a measure that creates a cumulative running total for revenue.
Cumulative Total=
Anonymous ,
Try changes in the measure
If Measure =
VAR CumulTot= [Cumulative Total MEASURE]
VAR preCumulTot= [CumlTotalPreviousMonth]
VAR Result= IF(not(Isblank(CumulTot)) && isblank(preCumulTot), 1,0)RETURN
ResultSeem like the same approach as
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458
2 Replies
- amitchandakSuper User
Anonymous ,
Try changes in the measure
If Measure =
VAR CumulTot= [Cumulative Total MEASURE]
VAR preCumulTot= [CumlTotalPreviousMonth]
VAR Result= IF(not(Isblank(CumulTot)) && isblank(preCumulTot), 1,0)RETURN
ResultSeem like the same approach as
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458 - AnonymousNot applicable
For some reason that works for the cumulative total but not the reverse.
Reverse= CALCULATE (SUM ( 'Sales'[Revenue] ),FILTER (ALL ( 'Date'[DATE] ),'Date'[DATE] >= MIN( ( 'Date'[DATE] ))))I would like to use the same formula for the reverse measure, but this one does not count my totals correctly. I would like to do the same month over month calculation . IF (rev)=blank && (previousmonth rev)<>0, 1,0Any idea?