Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext 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
Hello,
I am trying to create a measure that sums the averages by client over whatever period of time I chose. I have a data table with 150k clients and 200k accounts for each month over a 36 month period. So for example below if i wanted to see the total client revenue by John Doe I would need the measure to prevode an answer of 22+40= $62. Before anyone asks I cannot add up the revenue by account instead of by client for various reasons I wont bore you with. I tried SumX(Values(Client),Calculate(Average(Client revenue)) per recommendations from other posts but its not providng the correct answer. Any help would be appreciated!
Month Account Client Account Revenue Client Revenue
| January-22 | 123 | John Doe | $10.00 | $22.00 |
| January-22 | 124 | John Doe | $12.00 | $22.00 |
| January-22 | 125 | Jane Doe | $17.00 | $30.00 |
| January-22 | 126 | Jane Doe | $13.00 | $30.00 |
| February-22 | 123 | John Doe | $15.00 | $40.00 |
| February-22 | 124 | John Doe | $25.00 | $40.00 |
| February-22 | 125 | Jane Doe | $11.00 | $23.00 |
| February-22 | 126 | Jane Doe | $12.00 | $23.00 |
Solved! Go to Solution.
You need to replace the VALUES with SUMMARIZE, because you need to take the month into account too
SUMX(
SUMMARIZE( 'Table', 'Table'[Client], 'Table'[Month] ),
CALCULATE( AVERAGE( 'Table'[Client Revenue] ) )
)
You need to replace the VALUES with SUMMARIZE, because you need to take the month into account too
SUMX(
SUMMARIZE( 'Table', 'Table'[Client], 'Table'[Month] ),
CALCULATE( AVERAGE( 'Table'[Client Revenue] ) )
)
That worked.. Thank you!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |