Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have two tables.
Releases
ReleaseID |
A |
| B |
| C |
Tickets
| TicketID | ReleaseID | MyValue | Stuff |
| 1 | A | 2 | xyz1 |
| 1 | A | 2 | abc1 |
| 2 | B | 5 | xyz2 |
| 2 | B | 5 | abc2 |
| 3 | B | 1 | xyz3 |
| 4 | C | 10 | xyz4 |
Both tables are related in the data modell via the ReleaseID fields, i.e. the relation is 1:m from table Releases to table Tickets. I am looking for a way to get the sum of MyValue per ReleaseID for distinct values of TicketID. The value of MyValue is guaranteed to be identical for all rows with the same TicketID, those rows only differ by the entries in Stuff. But I want to count each TicketID only once in my sum.
So the result should be:
ReleaseID | SumMyValue |
A | 2 |
| B | 6 |
| C | 10 |
I guess I would somehow have to combine a SUMX over the RELATEDTABLE plus filtering on distinct values. But I can't get it to work.
Right now all my attempts lead to summing all MyValue values for the rows in Tickets, thus yielding A -> 4, B -> 11, C -> 10.
Solved! Go to Solution.
@janitor048 try this measure, Table 2 in my measure is table from many side and Table is from One side
Total Value = SUMX ( SUMMARIZE ( 'Table 2', 'Table'[ReleaseID], 'Table 2'[TicketID] ), CALCULATE ( MAX( 'Table 2'[MyValue] ) ) )
Would appreciate Kudos 🙂 if my solution helped.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@janitor048 try this measure, Table 2 in my measure is table from many side and Table is from One side
Total Value = SUMX ( SUMMARIZE ( 'Table 2', 'Table'[ReleaseID], 'Table 2'[TicketID] ), CALCULATE ( MAX( 'Table 2'[MyValue] ) ) )
Would appreciate Kudos 🙂 if my solution helped.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k thanks for your suggestion.
It works - but I can't yet really figure out why and how. Putting your formula in a measure and then creating a calculated column that uses this measure gives the correct results per row in my "one-side" table.
Putting your formula directly into the calculated column however gives incorrect results.
Could you maybe elaborate a bit more on how SUMX does it's magic here?
@janitor048 summarize is making the unique row and taking the maximum value of it and then sumx is summing it up. Hope this helps.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.