March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
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.
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
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
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:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |