Forum Discussion

Igotzepowerbi's avatar
Igotzepowerbi
Frequent Visitor
2 years ago
Solved

Year Title needs to be dynamic

 

 

 

Hello,

I have three year measures and my client wants the titles to be dynamic. So instead of saying Last Year Sum it would say 2023 - 2 years ago would say 2022. I don't want to have to change the titles every year. Does anyone know of a way to accomplish this?
Example of current dax calc.

2 years ago =
IF (
    SELECTEDVALUE ( 'Dollars / Units'[selected Dollars/Units Name] ) = "Dollars",
    CALCULATE (
        [sum of dollars],
        FILTER (
            'POS Aggregate',
            YEAR ( 'POS Aggregate'[Week End Date] )
                = YEAR ( TODAY () ) - 2
        )
    ),
    IF (
        SELECTEDVALUE ( 'Dollars / Units'[selected Dollars/Units Name] ) = "Units",
        CALCULATE (
            [sum of units],
            FILTER (
                'POS Aggregate',
                YEAR ( 'POS Aggregate'[Week End Date] )
                    = YEAR ( TODAY () ) - 2
            )
        )
    )
)

  • There is not a way to make the headers on viz be dynamic. If people push back on the TY, LY, LLY, LLLY, etc, I usually make a tile for them somewhere that shows what year they are filtered to (in case they don't want to look at the filter pane to see the year they are filtered to) and the explain that that year is equal to TY, and the LY, LLY, LLLY follow from there.

1 Reply

  • There is not a way to make the headers on viz be dynamic. If people push back on the TY, LY, LLY, LLLY, etc, I usually make a tile for them somewhere that shows what year they are filtered to (in case they don't want to look at the filter pane to see the year they are filtered to) and the explain that that year is equal to TY, and the LY, LLY, LLLY follow from there.