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 All,
I am trying to get sum of only distinct measure values for a particular Name if the value is repeated.
Name | Code | Type | Price |
10G | 72 | S | 10 |
11C | 86 | A | 12 |
3D | 18 | S | 10 |
3D | 18 | B | 5 |
3L | 91 | S | 5 |
3L | 91 | A | 15 |
3L | 91 | C | 10 |
AB | 58 | S | 15 |
AB | 58 | A | 15 |
FC | 38 | S | 40 |
YM | 74 | S | 20 |
YM | 74 | C | 20 |
when I create a view with just name column I want to get the sum aggregated with only unique values.
Expected o/p is as below
Name | Price |
10G | 10 |
11C | 12 |
3D | 15 |
3L | 30 |
AB | 15 |
FC | 40 |
YM | 20 |
Can some one please suggest. Thank you all in advance.
Solved! Go to Solution.
Try
Sum of unique values =
SUMX ( SUMMARIZE ( 'Table', 'Table'[Name], 'Table'[Price] ), 'Table'[Price] )
Try
Sum of unique values =
SUMX ( SUMMARIZE ( 'Table', 'Table'[Name], 'Table'[Price] ), 'Table'[Price] )
In my real time data the price column is coming from different table and it is not allowing to call price in the calculation any suggestions please
As long as the tables are related the same technique should work, you can summarize a table including values from a related table
Thanks @johnt75 dont know but initially when I have writted same formula it throwed an error deleted measure and re created and it worked.
Thanks for all your help
Hi John,
Thanks for your inputs tried the suggestion but still the same.
Also tried below measure nothing seems to work
Are you sure you used the right measure in the second table visual, both columns have the same name ?
Apologies John you are right some how while testing I might have added the same measure
Thank you again the measure works
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 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |