March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, I would like to get some help and support with the following DAX I've created:
Date | ContactID | ContactGroupID | Time1 | Time2 |
Oct 5 | 123 | 1122 | 60 | 20 |
Oct 5 | 112 | 1122 | 60 | 20 |
Oct 7 | 142 | 2233 | 30 | 30 |
Oct 7 | 125 | 2233 | 30 | 30 |
Oct 7 | 456 | 2233 | 30 | 30 |
Solved! Go to Solution.
@sjacob Try this:
Measure 3 =
SUMX (
SUMMARIZE (
FILTER ( MyTable2, MyTable2[ContactGroupID] <> 0 ),
MyTable2[ContactGroupID],
MyTable2[Time1],
MyTable2[Time2]
),
[Time1] + [Time2]
)
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.
@sjacob Try this:
Measure 3 =
SUMX (
SUMMARIZE (
FILTER ( MyTable2, MyTable2[ContactGroupID] <> 0 ),
MyTable2[ContactGroupID],
MyTable2[Time1],
MyTable2[Time2]
),
[Time1] + [Time2]
)
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.
Hello @parry2k thank you very much for this update. This works perfectly! Appreciate your support with this.
@sjacob can you explain with example data?
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.
Hi @parry2k thanks for your response. Sure, for example here is sample table:
Date | ContactID | ContactGroupID | Time1 | Time2 |
Oct 5 | 123 | 1122 | 60 | 20 |
Oct 5 | 112 | 1122 | 60 | 20 |
Oct 7 | 142 | 2233 | 30 | 30 |
Oct 7 | 125 | 0 | 30 | 30 |
Oct 7 | 456 | 0 | 30 | 30 |
From the DAX calculation, I would only want the sum of the unique rows of ContactGroupID that don't equal 0. So just the first row and third row for example.
@sjacob not sure why but it is working for me, how you are visualizing it:
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.
Hi @parry2k thank you for the response. I did a matrix visualization and I can actually see it working now thank you. However there's a missing piece I forgot to mention. I would like to only get this calculation for the unique rows with a ContactGroupID that is not 0. Looking forward to your response.
@sjacob try this measure:
Measure 3 = SUMX ( SUMMARIZE ( MyTable2, MyTable2[ContactGroupID], MyTable2[Time1], MyTable2[Time2] ), [Time1] + [Time2] )
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.
Thank you for your response. I tried this measure, but it still sums all the rows from this table. I want to be able to sum a unique ContactGroupID, so like the first row of each ContactGroupID.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |