- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Grand total not showing the result I was expecting
Hello guys,
I have a model that looks like this (simplified).
My goal is to dynamically calculate the amount of income (which is on the SALESFORCE table) that comes from any chosen dimensions. Both fact table and fact table agg.
For now I'm focusing on how to do it for the Fact table agg first.
We have detail and agg table by month because our gateway can't handle the amount of rows we have for each day, so we only show the detail for the last 30 days, and everything on the aggregation table.
- Fact table: Number of impressions by day (and other dimensions)
- Fact table agg: Number of impressions by month (and other dimensions)
Fact table agg Measures:
SUMImpresionesAgg = CALCULATE(SUM(fact_table_agg[totalimpressions]))
SUMRealRevenueAgg = CALCULATE([SUMImpresionesAgg]*[RealRevenueByImpression]) - Salesforce: Monthly orders with their revenue.
I've created a calculated table so I can have in a single table by SALESFORCE Order it's revenue and the sum of totalimpressions.
Impressions_By_SF_Orders = SUMMARIZE(DIM3;DIM3[ORDERID];SALESFORCE[order_revenue];"Impressions";SUM(FACTS_AGG[totalimpressions]))
Then I calculate the revenue for each impression as a calculated column:
RealRevenueByImpression = DIVIDE(Impressions_By_SF_Orders[order_revenue];Impressions_By_SF_Orders[Impressions];0)
So now I thought that having how much revenue I have for each impressions I could calculate what I want using SUMRealRevenueAgg, the result looks like this:
The thing is, for each row the result is correct but SUMRealRevenueAgg shows a Total amount which is not the SUM of the column but the multiplication of both SUMImpresionesAgg and RealRevenueByImpression.
What I was expecting to see there is 28281,21.
I hope I made myself clear but I'm not that good with English.
Maybe it's some basic mistake but I tried everything and still can't find what is wrong.
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous
It seems you may create a measure like below.
Measure = SUMX ( VALUES ( Table[Dimesion1] ), [SUMRealRevenueAgg] )
Or
Measure = SUMX ( SUMMARIZE ( Table, Table[Dimesion1] ), [SUMRealRevenueAgg] )
Below are some similar posts for your reference,
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
https://community.powerbi.com/t5/Desktop/Weighted-Average-from-Measures/m-p/553018#M260335
Regards,
Cherie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous
It seems you may create a measure like below.
Measure = SUMX ( VALUES ( Table[Dimesion1] ), [SUMRealRevenueAgg] )
Or
Measure = SUMX ( SUMMARIZE ( Table, Table[Dimesion1] ), [SUMRealRevenueAgg] )
Below are some similar posts for your reference,
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
https://community.powerbi.com/t5/Desktop/Weighted-Average-from-Measures/m-p/553018#M260335
Regards,
Cherie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Cherie,
Thanks for your response.
I'm not sure I understand those measures. The fact that you used Table[Dimension1] means that I need one measure for each dimension I want the result to show in the dashboard?
Anyway, seeing that you used SUMX I kinda unterstand what the problem is so if I add a calculated column in the Fact Table Agg like this:
And then I create a Measure like this:
The last measure gaves me the result I wanted finally.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
Anonymous
| 04-04-2024 06:14 AM | ||
05-17-2024 04:33 AM | |||
05-23-2024 12:16 PM | |||
04-26-2024 05:36 AM | |||
01-21-2024 07:04 PM |
User | Count |
---|---|
96 | |
87 | |
83 | |
52 | |
51 |