Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
My table has following structure:
In this table, if a combination of country and case have multiple weapons involved, the value shall be contained in those multiple rows(for example the 200 in row 2 and 3 here). However, I want to be able to create a table visual that gives the sum of the value per country, taking into account that only the distinct values per country and case should be summed up.
Table should look like this:
Germany 300
Belgium 200
Netherlands 100.
I'd like to use a calculated measure for this, but not sure how to code it. Can someone help me?
Regards,
Sander
Solved! Go to Solution.
Hi @Anonymous
Try this
Totals = SUMX ( SUMMARIZE ( Country, Country[Country], Country[Case], "Value", DISTINCT ( Country[Value] ) ), [Value] )
Replace Country by your tablename.
Cheers
CheenuSing
Hi @Anonymous
Try this
Totals = SUMX ( SUMMARIZE ( Country, Country[Country], Country[Case], "Value", DISTINCT ( Country[Value] ) ), [Value] )
Replace Country by your tablename.
Cheers
CheenuSing
Hi @Anonymous ,
I forgot to add the following lines.
Now create a table visual with Country and Totals
You will get your desired result.
Cheers
CheenuSing
@Anonymous hi can you explain the rule a bit better, why for germany is it only 300 and not 400? there doesnt seem to be a clear rule for which row you want if there is more than one.
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
42 | |
31 | |
27 | |
27 |