Forum Discussion
Anonymous
3 years agoNot applicable
Dynamic Previous Months Data
Hi All, I have a Separate date table in power BI with name "Date", I have columns Date, Year, Month , quarter in that table I have another table Content I have made relation of date table Date c...
- 3 years ago
Anonymous You can use EOMONTH for this kind of thing. For example:
1 Month Ago Measure = VAR __Date = MAX( 'Dates'[Date] ) VAR __MaxDate = EOMONTH( __Date, -1 ) VAR __MinDate = DATE( YEAR( __MaxDate ), MONTH( __MaxDate ), 1 ) VAR __Result = CALULATE( [Some Measure], 'Dates'[Date] >= __MinDate && 'Dates[Date] <= __MaxDate ) RETURN __ResultAlso, this may help as well:
Greg_Deckler
3 years agoCommunity Champion
Anonymous You can use EOMONTH for this kind of thing. For example:
1 Month Ago Measure =
VAR __Date = MAX( 'Dates'[Date] )
VAR __MaxDate = EOMONTH( __Date, -1 )
VAR __MinDate = DATE( YEAR( __MaxDate ), MONTH( __MaxDate ), 1 )
VAR __Result = CALULATE( [Some Measure], 'Dates'[Date] >= __MinDate && 'Dates[Date] <= __MaxDate )
RETURN
__Result
Also, this may help as well: