cancel
Showing results for
Did you mean:
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
Super User

@SilviaM try this measure:

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

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.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

3 REPLIES 3
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!

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.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Super User

@SilviaM try this measure:

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

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.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Regular Visitor

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

Announcements