Forum Discussion

ShrimpSurf's avatar
ShrimpSurf
Icon for Helper II rankHelper II
4 years ago
Solved

Filtering Month Totals for a Specific Year

I'm going crazy trying to understand what time intelligence calculation to use to filter a specific year, where month totals will show in charts.  I use the below between when I filter the month it shows the year total.  What change do you recommend?

 

Revenue 2021 =
CALCULATE('Key Measures'[Revenue],
DATESBETWEEN('Calendar'[Date],
date(2021,1,1),
date(2021,12,31)
)
)
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  ShrimpSurf ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    Sum_Month = SUM('Table'[Revenue])
    Flag =
    IF(
        MAX('Table'[Date])>=DATE(2021,1,1)&&MAX('Table'[Date])<=DATE(2021,12,31),1,0)

    2. Place [Flag] in Filters, set is=1, apply filter.

    3. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  ShrimpSurf ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    Sum_Month = SUM('Table'[Revenue])
    Flag =
    IF(
        MAX('Table'[Date])>=DATE(2021,1,1)&&MAX('Table'[Date])<=DATE(2021,12,31),1,0)

    2. Place [Flag] in Filters, set is=1, apply filter.

    3. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • You can use this 

    Revenue 2021 =
    CALCULATE('Key Measures'[Revenue],YEAR('Calendar'[Date])=2021)
    • ShrimpSurf's avatar
      ShrimpSurf
      Icon for Helper II rankHelper II

      I still get the calendar year total as the total for each monthly total?