Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |