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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Matrix - Total in a measure doesn't sum up

I build a matrix where one of the column is a measure that take the biggest number between data coming from 2 differents sources : 

 

Inscription = SWITCH(
    TRUE(),
    SUM('Prod Asso Inscrites OnLine'[Inscription Prod]) > SUM('GA Asso Inscrites OnLine'[Associations Inscrites]), SUM('Prod Asso Inscrites OnLine'[Inscription Prod]),
    SUM('Prod Asso Inscrites OnLine'[Inscription Prod]) <= SUM('GA Asso Inscrites OnLine'[Associations Inscrites]), SUM('GA Asso Inscrites OnLine'[Associations Inscrites])
)

But as you can see the tota show me 3572 instead of 3813.

PBI_matrixTotalIssue.jpg

 

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Try this MEASURE which references your original measure

Idea is to sum up the MEASURE "Inscription" for all "Canaux Online" values

 

iNSCRIPTION2 =
IF (
    HASONEFILTER ( TableName[Canaux Online] ),
    [Inscription],
    SUMX ( VALUES ( TableName[Canaux Online] ), [Inscription] )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

5 REPLIES 5
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Try this MEASURE which references your original measure

Idea is to sum up the MEASURE "Inscription" for all "Canaux Online" values

 

iNSCRIPTION2 =
IF (
    HASONEFILTER ( TableName[Canaux Online] ),
    [Inscription],
    SUMX ( VALUES ( TableName[Canaux Online] ), [Inscription] )
)

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

@Zubair_Muhammad 

Thank but how do I add this measure to my matrix as a total ?

 

 

@Anonymous 

 

Just Add this MEASURE in the MAtrix's Values section.

Replace TableName with your actual TableName

 


Regards
Zubair

Please try my custom visuals
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

Actually, you not need to use switch function. SWITCH function not suitable to handle summarize records, you can use max function to package these calculations to return the bigger one.

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

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Thank you @v-shex-msft but I changed the measure ans still have the same result for total.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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