Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
k943
Helper I
Helper I

Matrix table: hide a column when at least one row of value is blank

I would like to dynamically hide column when there is at least one row value is blank. The value is from a measure that calculate the average price of a product in monthly period.

 

In the example below, in March, certain products do not have price yet, so the averages are blank, I would like to set up a way to dynamically hide the March column (3.2024), so the matrix table will only have 1.2024 and 2.2024 columns (as in the second figure) . 

 

k943_0-1710485248036.png

 

 

desired output:

k943_1-1710485283706.png

 

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi @k943 ,

 

I created the following formula which seems to work for your needs.

result = 
VAR _count =
    COUNTX (
        FILTER ( ALL ( 'Table' ), 'Table'[Date] = MAX ( 'Table'[Date] ) ),
        [Date]
    )
VAR _countblank =
    COUNTX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] = MAX ( 'Table'[Date] )
                && 'Table'[Value] <> BLANK ()
        ),
        [Date]
    )
RETURN
    IF ( _count <> _countblank, BLANK (), MAX ( 'Table'[Value] ) )

vkongfanfmsft_0-1711009855635.png

Best Regards,
Adamk Kong

 

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

 

Thank you for the assistance. Unfortunately it is not working. I think it is because for rows who are blank in certain period, the values (price data) are not even in the table yet, they are not existing and therefore they are blank. That means in your DAX, 

'Table'[Value] <> BLANK ()

might need to be adjusted?  This is just my 2 cents. Let me know if you are able to resolve. Thank you very much anyway!

 
   
lbendlin
Super User
Super User

I would like to dynamically hide column

Let me stop you right there. Not possible in Power BI.

 

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors