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 there, I have been looking around the community for almost 2 hours but I can't seem to find a solution to my problem. Thought I got it, but the end result didn't match the expected value.
I have the following problem:
I want to calculate the price per Service ID. So let's say I want to calculate the revenue
Price * Amount = Revenue
My expected result:
Service ID | Revenue |
1 | 1.000 |
2 | 50 |
3 | 5.100 |
4 | 585.000 |
Instead I get:
Service ID | Revenue |
1 | 16.000 |
2 | 200 |
3 | 81.600 |
4 | 585.000 |
Does someone know how to take only a unique service ID in my measure?
Thanks in advance!
Solved! Go to Solution.
Hi,
This measure works
Measure = SUMX(SUMMARIZE(GENERATE(VALUES(Data[Price]),VALUES(Data[Amount])),Data[Price],Data[Amount],"ABCD",min(Data[Price]),"EFGH",MIN(Data[Amount])),[ABCD]*[EFGH])
Hope this helps.
HI @Gjakova,
It seems like your table exists lots of duplicate records, have you consider removing them before calculate them?
You can refer to Ashish_Mathur 's suggestion to summarize in expression or enter to 'query editor' to use the 'remove duplicate' feature.
Remove duplicates (Power Query) - Excel (microsoft.com)
Regards,
Xiaoxin Sheng
HI @Gjakova,
It seems like your table exists lots of duplicate records, have you consider removing them before calculate them?
You can refer to Ashish_Mathur 's suggestion to summarize in expression or enter to 'query editor' to use the 'remove duplicate' feature.
Remove duplicates (Power Query) - Excel (microsoft.com)
Regards,
Xiaoxin Sheng
Hi,
This measure works
Measure = SUMX(SUMMARIZE(GENERATE(VALUES(Data[Price]),VALUES(Data[Amount])),Data[Price],Data[Amount],"ABCD",min(Data[Price]),"EFGH",MIN(Data[Amount])),[ABCD]*[EFGH])
Hope this helps.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |