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?
michaelu1
2 years agoAdvocate II
I use this in power Query:
#"Added Custom1" = Table.AddColumn(#"Inserted Quarter", "Month Offset", each (([Year]-Date.Year(Today))*12)
+([Month]-Date.Month(Today))),
Anonymous
2 years agoNot applicable
OKay thanks! I am trying it out now