Forum Discussion

Julaiha's avatar
Julaiha
Frequent Visitor
2 years ago

DAX to Replace Values

Hai Expert,

 

I need to creata a dax that will shows dash (-) when user choose year slicer 2023 onwards , this dash is to replace value null/blank for the year 2023 onwards.

2 Replies

  • rubayatyasmin's avatar
    rubayatyasmin
    Icon for Community Champion rankCommunity Champion

    Hi, Julaiha 

     

    Here is the sample DAX based on your requirement. 

     

    Measure = 
    CALCULATE(
        MAX('YourTable'[OriginalColumn]),
        FILTER(
            'YourTable',
            'YourTable'[Year] < 2023
        )
    ) & IF(MAX('YourTable'[Year]) >= 2023, "-", "")