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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JacktheYeti
Helper I
Helper I

Measure is causing incorrect Grand Total

I'm using the following measure to calculate the total Cost per Unit allocated:

'Total $ Amount = SUM('Campaign'[CostPerMasterKey]) * SUM('RPT_CampaignOrderMasterKeyCounts'[TotalMasterKeysCount])'
 
BundleCost Per UnitTotal Units AllocatedCPU * Total Units
Bundle 1$6.00318164$1,908,984.00
Bundle 2$6.5031413$204,184.50

 

Output:

The Grand Total the measure returns is $4,369,712.50 which is incorrect. I expected a Grand Total of $2,113,168.50. I'm not sure what's causing this issue, any help is appreciate in understanding the errors of my ways 🙂

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @JacktheYeti 

your formula should read:

 

Total $ Amount = SUMX('Campaign', 'Campaign'[CostPerMasterKey] * RELATED('RPT_CampaignOrderMasterKeyCounts'[TotalMasterKeysCount]))

 

if both table have an active relationship.

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

3 REPLIES 3
FrankAT
Community Champion
Community Champion

Hi @JacktheYeti 

your formula should read:

 

Total $ Amount = SUMX('Campaign', 'Campaign'[CostPerMasterKey] * RELATED('RPT_CampaignOrderMasterKeyCounts'[TotalMasterKeysCount]))

 

if both table have an active relationship.

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

This did the trick, thanks very much. I'll need to read up on the RELATED and SUMX functions.

 

Warm regards,

Jack

darentengmfs
Post Prodigy
Post Prodigy

Hi @JacktheYeti 

 

You need to use SUMX instead of SUM.

 

Refer to the article: https://community.powerbi.com/t5/Desktop/SUMPRODUCT-in-excel-but-what-is-it-in-BI/td-p/129047

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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