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
Anonymous
Not applicable

Create a new total column per specific row

Hello,

I need some help for summarize row in a new column with a condition on rows

The logic is : Sum for each product the value of BRAND A & BRAND B and put in every row

What i have :

ValentintT_0-1669795934840.png

 

What i want :

ValentintT_1-1669795965815.png


Sum of product A BRAND A + product A BRAND B = 15

Sum of product B BRAND A + product B BRAND B = 50

 

Thanks for your help 🙂

 

1 ACCEPTED SOLUTION

@Anonymous Then try this Measure, also attached an example file

 

 

Measure = 
  CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] in  {"A","B"} , ALLEXCEPT('Table','Table'[Product]))

 

 

Screenshot_15.jpg


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thanks for your help

But i expressed my problem badly
I need it for every products but A and B aren't the only products :

ValentintT_0-1669800097415.png

 



 

@Anonymous Then try this Measure, also attached an example file

 

 

Measure = 
  CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] in  {"A","B"} , ALLEXCEPT('Table','Table'[Product]))

 

 

Screenshot_15.jpg


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
Anonymous
Not applicable

It's perfect ! thanks for this solution

@Anonymous How many products do you have in the table? 


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
DimaMD
Solution Sage
Solution Sage

Hi @Anonymous try it

Measure = 
 VAR BR_a = CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "A" &&  'Table'[Product] = "A") + CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "B" &&  'Table'[Product] = "A")
 VAR BR_b = CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "A" &&  'Table'[Product] = "B") + CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "B" &&  'Table'[Product] = "B")
 return
 IF( SELECTEDVALUE('Table'[Product]) = "A", BR_a ,BR_b)

Screenshot_13.jpg


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

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.

Top Solution Authors