Forum Discussion
Anonymous
10 years agoNot applicable
Create measure filter
I need to create a measure that makes a calculation by there a filter I do, for example, calculate (sum (table [column]); table [column that will suffer the filter]) in my case would be the year filt...
Sean
10 years agoCommunity Champion
I don't get this. But you can always hard code the filter like this for example
2015 Total = CALCULATE (SUM(Table[Column]), CalendarTable[Year]=2015)
If you want to do Year to Date = TOTALYTD(SUM(Table[Column]), CalendarTable[Date])
Greg_Deckler
10 years agoCommunity Champion
Sean's method was one of the alternatives that I was alluding to. The equivalent in SUMX syntax is:
=SUMX(FILTER(Table, Table[Year]=2015),[ColumnToSum])
Here is an article on SUM vs. SUMX vs. CALCULATE
http://www.powerpivotpro.com/2014/10/sum-sumx-or-calculatechoices-choices/
The article isn't complete as it doesn't mention that you can also change the filter context with SUMX.