Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I am trying to solve a problem through dax. currently there is duplicate data in my table and requirement is not to delete the duplicate records because if the user filters based on country they should see the correct result. Sample data is below
| Contract No | volume | type | country |
| 1111 | 10 | original | singapore |
| 1111 | 10 | reporting | netherland |
| 2222 | 15 | original | vietnam |
the o/p should be for contract no 1111 total volume should be 10.
for singapore volume should be 10 similarly for netherland volume should show 10.
for both singapore and netherland volume should be 10. There can be max 2 lines of a contract(original,reporting) or 1.
how i can get the correct sum using dax?
Solved! Go to Solution.
Hi, @Oliya
According to your description, you want to get the total of the [volume] accoding to your logic.
Here are the steps you can refer to :
(1)My test data is the same as yours.
(2)We can create two measures:
Measure = MAXX('Table','Table'[volume])Measure 2 = SUMX(VALUES('Table'[Contract No]) ,[Measure])
(3)Then we can put the [Measure 2] and the fields on the visual and then we can meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @Oliya
According to your description, you want to get the total of the [volume] accoding to your logic.
Here are the steps you can refer to :
(1)My test data is the same as yours.
(2)We can create two measures:
Measure = MAXX('Table','Table'[volume])Measure 2 = SUMX(VALUES('Table'[Contract No]) ,[Measure])
(3)Then we can put the [Measure 2] and the fields on the visual and then we can meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
total should show as 25.
hi @Oliya
Measure rely heavely on context. How are you going to use the measure?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 37 | |
| 28 | |
| 27 |