Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello experts,
I have a table visual (my input data table as in screenshot below), which has details per country/year/entity. The request is to create a measure that can sum the difference based on the combination of country and year only (ignoring the entity) and to have that as a column in table visual.
For example: For client A, Country "United States" has records for three entities for year 2022 so the output measure should be 521+100+216 = 837.
Similarly, For client B, Country "Australia" has records for two entities for year 2021 so the output measure should be 228+500 = 728.
Please can some one provide some guidance. Below are the Input and expected output in screenshot.
Any help is highly appreciated!
Hi
Please try this code :
Hi @JamesFR06 I m getting a different answer, please can you help me. I m getting the same value for all countries and years, please see screenshot below.
There some relation layong in your model.
With this code it will be ok
@JamesFR06 Looks like the measure is incomplete (TableTotal[Client]=Clt&&TableTotal[Country]=Ctry&&TableTotal[Year]=Annee ). Would be really nice if you can share the complete measure.
@AnthonyJoseph This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.
Thanks @Greg_Deckler
The solution is giving me the same value across the table. Please can you help me understand, where I m going wrong.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 20 | |
| 12 | |
| 11 |