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.
Hello,
Pretty much, I have two fields of data that I'm trying to connect through a measure and determine the difference between two totals that are categorized by a code. For example:
Field 1
Code Amount
ABC 100
DEF 200
GHI 300
Field 2
Code Amount
ABC 50
DEF 100
GHI 150
In my actual data, both "Code" lines are linked via the relationship manager, but when I write a measure subtracting the respective Amounts, I don't get the correct answer. I should be getting ABC = 50, DEF = 100 and GHI = 150 if I'm creating a measure to subtract the amounts by Code.
Can someone please help me as to what I should be writing as a measure to correctly subtract the two? Thank you for your help.
Solved! Go to Solution.
You can create measure using the following code
Diff = SUM(Field1[amount]) - SUM(Field2[amount])
Make sure Code from both tables connected with relationship both directional
Regards,
Sayali
If this post helps, then please consider Accept it as the solution to help others find it more quickly.
Proud to be a Super User!
You can create measure using the following code
Diff = SUM(Field1[amount]) - SUM(Field2[amount])
Make sure Code from both tables connected with relationship both directional
Regards,
Sayali
If this post helps, then please consider Accept it as the solution to help others find it more quickly.
Proud to be a Super User!
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 |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |