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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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] ) ) )

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.