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
DWilming
Regular Visitor

Summarize Data based on each row of table

Hi, 

 

I have a table with the following data: 

Customer, Country, Product, Netsales

 

With this origin a prepare a matrix which summarize all Netsales for Customer and Product.

 

|Country | Customer | Product | Netsales |

 

Now I want to add a measure which summarize all Netsales for each Product and Country. And show this value depending from the country of this customer in each row 

 

| Country | Customer | Product | Netsales | Netsales per Country |


Any Ideas?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

sales per country =Calculate(sum(table[netsale]),allexcept(table,table[country],table[product]))

Thanks,
Pravin

If it resolves your problem mark it as a solution and give Kudos.

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

OK, so what do you have in your rows, columns and values for your matrix visual?

 

Some mocked-up data would really help along with the expected output of that sample data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Ok, I hope this explains it better. So this is the visual except the last column. For this column I'm looking for a Measure example command, which generate the value based on the country and product column.

 

CountryCustomerProductNet SalesNet Sales Country
AlbaniaCustomer AProductX1001465
AlbaniaCustomer BProductY123123
AlbaniaCustomer CProductX1321465
RomaniaCustomer AProductX12331233
RomaniaCustomer BProductxw12221222
RomaniaCustomer CProductyy14441444
GermanyCustomer AProductX12232454
GermanyCustomer BProductX12312454
GermanyCustomer CProductxw23212321
GermanyCustomer AProductyy23222322

 

Anonymous
Not applicable

sales per country =Calculate(sum(table[netsale]),allexcept(table,table[country],table[product]))

Thanks,
Pravin

If it resolves your problem mark it as a solution and give Kudos.

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