Forum Discussion
Anonymous
2 years agoNot applicable
Issues with Month[today]
I have a formula: 6month Prior = CALCULATE(SUM('Sales Data'[sales_price]), FILTER('Sales Data','Sales Data'[Month Match] = true && 'Sales Data'[Month if Matching] = [Current Month]-6))/ CALCUL...
- 2 years ago
Anonymous I would recommend using EOMONTH. You can use a pattern such as:
Measure = VAR __Today = TODAY() VAR __Max = EOMONTH( __Today, -6 ) VAR __Min = DATE( YEAR( __EOM6 ), MONTH( __EOM6 ), 1 ) VAR __Table = FILTER( ALL( 'Sales Data' ), [Date] >= __Min && [Date] <= __Max ) VAR __Result = SUMX( __Table, [sales price] ) RETURN __ResultOr do you not have a Date column?
Greg_Deckler
Community Champion
2 years agoAnonymous I would recommend using EOMONTH. You can use a pattern such as:
Measure =
VAR __Today = TODAY()
VAR __Max = EOMONTH( __Today, -6 )
VAR __Min = DATE( YEAR( __EOM6 ), MONTH( __EOM6 ), 1 )
VAR __Table = FILTER( ALL( 'Sales Data' ), [Date] >= __Min && [Date] <= __Max )
VAR __Result = SUMX( __Table, [sales price] )
RETURN
__Result
Or do you not have a Date column?
Anonymous
2 years agoNot applicable