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
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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.