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
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?
Didnt know you could have variables in DAX.. cool
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