Forum Discussion

bburzanko3's avatar
bburzanko3
Regular Visitor
1 year ago
Solved

Month Slicer Not Working with Year Calculation

Hello - I cannot figure out how to get the month slicer to work with 2 measures I have created for 2024 & 2025 Sales. I want to be able to just select January or January & February and have the 2025 & 2024 Spend amounts adjust based on those months. My 2025 & 2024 Spend formulas are below. When I pull the month from my date table into the slicer to change it, the amount dont change and just show the total for the 2 year. The Date table is joined on the invoice date from my Combined spend data. Any help is much appreciated!

 

2025 Spend = CALCULATE(SUM('Combined Spend Data'[Total]),Year(Calendar[Date])=2025)
2024 Spend = CALCULATE(SUM('Combined Spend Data'[Total]),Year(Calendar[Date])=2024)
 

 

  • bburzanko3 

     

    2025 Spend = CALCULATE(SUM('Combined Spend Data'[Total]),KEEPFILTERS(Year(Calendar[Date])=2025))
    2024 Spend = CALCULATE(SUM('Combined Spend Data'[Total]),KEEPFILTERS(Year(Calendar[Date])=2024))

3 Replies

  • bburzanko3 

     

    2025 Spend = CALCULATE(SUM('Combined Spend Data'[Total]),KEEPFILTERS(Year(Calendar[Date])=2025))
    2024 Spend = CALCULATE(SUM('Combined Spend Data'[Total]),KEEPFILTERS(Year(Calendar[Date])=2024))
  • Hi,

    You may drag Year from the Calendar table and simplify your measure to

    Total = SUM('Combined Spend Data'[Total])

    You may then filter the visual to only show 2 years.