Forum Discussion
Trying to sum full year but getting error message
- 9 years ago
Full Year 2016 = CALCULATE ( SUM ( Budgets[Amount] ), FILTER ( ALL ( 'Calendar$' ), 'Calendar$'[Date].[Year] = 2016 ) )So if your Slicer is from the Calendar table use the above!
If not this should work either way...
Full Year 2016 ALT = CALCULATE ( SUM ( Budgets[Amount] ), FILTER ( ALL ( 'Budgets' ), 'Budgets'[budget_code] = 2016 ) ) - 9 years ago
Hi Anonymous,
Thanks Jerry, i can see that working but the problem is we have transactions in there for next year.
Would MAX still bring in 2016? or 2017?
What columns are you using for the "Year" Slicer and "Month" Slicer? If the columns used for the Slicers are all from your "Calendar$" table(and you should use date column of the"Calendar$" table for both your Slicers in this scenario), then the formula I provided above will sum the full year depends on your selection of the "Year" Slicer. For example, if you select "2016" for "Year" Slicer, then the MAX will bring in 2016, and the measure will sum full year of 2016.:smileyhappy:
Regards
No matter what I do even
Full Year = CALCULATE ( Sum(Budgets[amount]),Budgets[budget_code]=2016)
Only returns the month selected in the slicer...I need to override it somehow?
Anyone?
- Sean9 years ago
Community Champion
Full Year 2016 = CALCULATE ( SUM ( Budgets[Amount] ), FILTER ( ALL ( 'Calendar$' ), 'Calendar$'[Date].[Year] = 2016 ) )So if your Slicer is from the Calendar table use the above!
If not this should work either way...
Full Year 2016 ALT = CALCULATE ( SUM ( Budgets[Amount] ), FILTER ( ALL ( 'Budgets' ), 'Budgets'[budget_code] = 2016 ) ) - Anonymous9 years agoNot applicable
Thanks Sean, will give that a try, take it there is no way to get it to say 2016 automatically?