how to hide blank columns in power bi matrix

Viewed 3236

i have the below matrix, i need to hide "Budget" and "% Achieved to budget" when they are blank or 0. for example in the below screen shot, they should only be displayed for year 2021, for the remaining years only "Actual" value should be shown.

enter image description here

appreciate your assistance Georges

2 Answers

You should add a filter using Budget and % Achieved and unselect Empty in options given.

You can create 3 Measures for your Actual, Budget and Percentage following logic as below-

sum_actual = IF(
    SUM('your_table_name'[actual]) > 0,
    SUM('your_table_name'[actual]),
    BLANK()
)

This will return BLANK when there is no value. Now use those measures for Metrix property and hopefully you will get your desired output.

Related