cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SilviaM
Regular Visitor

Sum numbers with DAX where numbers are repeated

Hi All, 

 

  I need to make a measure to calculate the sum of values where those values are repeated by service name but i just need to sum the first 1 instead of all because it belongs a service:

 

Table1

Service       Value1   Value2

Service1      278        1023

Service1      789        1023

Service1      895       1023

Service2      566        468

Service2      453        468

Service2      231        468

 

The value that i tried to get is Measure=1023+468

I tried to use Sumx(Table1,averagex(Table1[Value2]) but it doesn't work, Any help???

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@SilviaM try this measure:

 

Sum =
SUMX ( VALUES ( Table[Service] ), CALCULATE ( MAX ( Table[Value2] ) ) 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 






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.





View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@SilviaM glad it worked out. Feel free to subscribe to my youtube channel, like below. I am posting interesting power bi related how-to's and tips on my channel. Cheers!

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






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
Super User
Super User

@SilviaM try this measure:

 

Sum =
SUMX ( VALUES ( Table[Service] ), CALCULATE ( MAX ( Table[Value2] ) ) 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 






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.





It worked!!!! really appreciate your help!!!! Thanks thanks thanks!!!!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors