Forum Discussion

Justas4478's avatar
Justas4478
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Year table grouped using measure

Hello, I have year table and I am trying to group it in to custom group that would have years I specify.   Only problem is that I can only use measures to do the grouping.   This is what I am try...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Justas4478 ,

     

    Please try:

    Measure =
    SWITCH (
        TRUE (),
        MAX ( 'Table'[Year] ) >= 2017
            && MAX ( 'Table'[Year] ) <= 2020, "2017-2020",
        MAX ( 'Table'[Year] ) >= 2021
            && MAX ( 'Table'[Year] ) <= 2024, "2021-2024"
    )
    

     

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