Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
marcoslopez
Helper I
Helper I

Suma de sumas bajo una condición / Sum of sums under one condition

[ES]
Hola a todos, estoy intentando hacer algo que paso a explicar a continuación, pero no tengo mucha experiencia en DAX.

Mis datos:
Cliente | Importe
A   |    5
B   |    -10
A   |    -3
C   |    -5
C   |    -10
B   |    -7
B   |    25
A   |    1
C   |    5

Paso intermedio
Cliente | Importe
A   |    3
B   |    8

Valor final que debo mostrar:
11


En síntesis, debo mostrar la suma de importes de los clientes cuya suma > 0

[EN]
Hello everyone, I'm trying to do something that I'll explain next, but I do not have much experience in DAX.

My data:
Cliente | Importe
A   |    5
B   |    -10
A   |    -3
C   |    -5
C   |    -10
B   |    -7
B   |    25
A   |    1
C   |    5

Intermediate step
Cliente | Importe
A   |    3
B   |    8

Final value that I must show
11

In summary, I must show the sum of customer amounts whose sum> 0

Thanks!

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=SUMX(FILTER(SUMMARIZE(VALUES(Data[Clientele]),[Clientele],"ABCD",SUM(Data[Importe])),[ABCD]>0),[ABCD])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=SUMX(FILTER(SUMMARIZE(VALUES(Data[Clientele]),[Clientele],"ABCD",SUM(Data[Importe])),[ABCD]>0),[ABCD])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

It works! thanks!
It helped me a lot.

Greetings from Argentina
!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
marcoslopez
Helper I
Helper I

I forgot sth, I need this to put in a Card

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.