Forum Discussion

AnthNC's avatar
AnthNC
Helper II
2 years ago
Solved

Percentage calculation with missing data

Hi everyone, Could you help me with this problem please :   I'm showing in a bar graph the percentage of people who drive wagons, vans and suv, like so :   The data is from a survey in whi...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi AnthNC ,

    raji_n  said adding the year to the x-axis is one way.
    And AnthNC you can also try this, put the field Year into the small multiples:




    Or you can use this DAX to create a measure:

     

    Measure = 
    IF(
        NOT ISFILTERED('table1 vehicles'[Year]),
        IF(
            MAX('table1 vehicles'[Attribut]) = "Van",
            "After 2022",
            BLANK()
        ),
        BLANK()
    )

     


    Place this measure in Data labels > Details:

    Then the "After 2022" field will appear in the Data label:

    I changed the color and font size.

    And this will not affect the visual effect after you select the slicer:

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