Forum Discussion
Connerf
7 years agoFrequent Visitor
Month to Go Calculation
Hey Power BI Team, I'm looking for a bit of help regarding a month to go (MTG (no not magic the gathering)) calculation. The calculation needs to accomplish the following three things: Retur...
- 7 years ago
Ok, try this slight change then. Remember to always show an example based on your data to explain what you need. It is very helpful for those trying to provide an answer
TG Production = VAR maxDate = IF ( MONTH ( TODAY () ) = MONTH ( MAX('Date'[Date] )), EOMONTH ( TODAY (), 0 ), MAX ( 'Date'[Date] ) ) RETURN CALCULATE ( [Total Schedule], FILTER ( 'Date', 'Date'[Date] >= TODAY () && 'Date'[Date] <= maxDate ) )
Ashish_Mathur
7 years agoSuper User
Hi,
To your visual, drag Date from the Date Table. Try this measure
=IF(MAX('Date'[Date])<=TODAY(),CALCULATE([Total Schedule],DATESBETWEEN('Date'[Date],TODAY(),EOMONTH(TODAY(),0))),[Total Schedule])
Hope this helps.