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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 :

What i want :

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
Solution Sage

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

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

__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
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 :

Solution Sage

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

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

__________________________________________

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

Solution Sage

@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
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)``````

__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

## Helpful resources

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors