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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mahsy
Helper I
Helper I

Hide empty column and replace null by zero in matrix

Hi,

I need your help please ! 

Here is a diagram explaining my problem and the expected result. 

 

mahsy_0-1643968863388.png

Thank you for your help !

1 ACCEPTED SOLUTION

Hi @mahsy ,

Maybe the formula is not standardized enough, try this one:

Measure =
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[AXE1] = MAX ( 'Table'[AXE1] )
            && 'Table'[AXE2] = MAX ( 'Table'[AXE2] )
    )
)

This can get the result by your sample.

vkalyjmsft_0-1644463162958.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@mahsy , Try a measure like

calculate(sum(Table[Value]), filter(allselected(Table), Table[AXE1] = max(Table[AXE1] ) && Table[AXE2] = max(Table[AXE2] ) ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, thank you for your response !

I get this error with your formula.

mahsy_0-1643994968250.png

 

Hi @mahsy ,

Maybe the formula is not standardized enough, try this one:

Measure =
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        'Table'[AXE1] = MAX ( 'Table'[AXE1] )
            && 'Table'[AXE2] = MAX ( 'Table'[AXE2] )
    )
)

This can get the result by your sample.

vkalyjmsft_0-1644463162958.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.