Forum Discussion
juju
9 years agoHelper III
MTD Calculation
I am using the formula below to pull the MTD value from the previous day. I'd like to make the value of the first day of each month blank - so it doesnt pull from the last day of the previous mon...
- 9 years ago
All set. Managed to get it working with this :
Previous Day MTDcALC = IF ( FactTable[Date] = STARTOFMONTH(FactTable[Date]), BLANK(), TOTALMTD ( CALCULATE ( CALCULATE ( SUM(FactTable[Value]), FILTER ( FactTable, FactTable[Channel]= "MyChannel" ) ) ), PreviousDay (FactTable[Date]) ) )Thxxxx
dkay84_PowerBI
9 years agoMicrosoft Employee
Could you add a calc column for "first day of month" flag and then use an IF statement to get what you want? Not sure based on your description but pseudo code would be:
If "flag" is true then start MTD calculation from 0 else MTD calculation
If "flag" is true then start MTD calculation from 0 else MTD calculation