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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Get the MAX SUM except for this data

Previously I had an issue that @Zubair_Muhammad solved here : https://community.powerbi.com/t5/Desktop/Matrix-Total-in-a-measure-doesn-t-sum-up/m-p/729524#M352008

 

I needed to get the max sum value from differents sources but having the total sum not as the MAX(SUM()) but the SUM of the returned data.

 

For that I added a first measure

InscriptionMeasure = 
MAX (
    SUM ( 'Prod Asso Inscrites OnLine'[Inscription Prod] ),
    SUM ( 'GA Asso Inscrites OnLine'[Associations Inscrites] )
)

Then from that I added a second one that I used in my matrix:

Inscription = 
IF (
        HASONEFILTER ( 'Canaux Online'[Canaux Online] ),
        [InscriptionMeasure],
        SUMX ( VALUES ( 'Canaux Online'[Canaux Online] ), [InscriptionMeasure] )
)

Now I need to had another IF inside this logic.

I want the exacte same result except if the column is "Canaux Online" = "SMO" I need to had the SUM coming from Another table.

 

PBI_SUM_SMO.png

 

I try differente solution but I cannot make this work. Any idea how ?

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Try this modification

 

Inscription =
IF (
    HASONEFILTER ( 'Canaux Online'[Canaux Online] ),
    [InscriptionMeasure],
    SUMX (
        EXCEPT ( VALUES ( 'Canaux Online'[Canaux Online] ), { "SMO" } ),
        [InscriptionMeasure]
    )
)
Anonymous
Not applicable

Thank you @Zubair_Muhammad 

It doesn't seem to do anything.

 

Also even if I can exclude the SMO part, how can I add in place the SUM from the other source ?

HI, @Anonymous 

It should work well, if you want conditional from other source, you could try this way

Inscription 33 = 
IF (
    HASONEFILTER ( 'Canaux Online'[Canaux Online] ),
    [InscriptionMeasure],
    SUMX (
        EXCEPT ( VALUES ( 'Canaux Online'[Canaux Online] ), VALUES('other source'[Canaux Online]) ),
        [InscriptionMeasure]
    )
)

if possible, please share a simple sample pbix file for us have a test.

You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Lin

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.