Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
Probably a very basic question, but I"m stuck.
My table looks like this
Customer Week Sale
A 1 100
B 1 200
A 1 50
B 1 10
A 2 50
B 2 150
A 2 50
I want to be able to SUM sales per customer, per week
I want my table to look like this afterwards
Cust Week Sale Total
A 1 100 150
B 1 200 210
A 1 50 150
B 1 10 210
I would expect to use a SUMX, but I have not been able to understand how that works... Any help will be appreciated.
Thanks
R
Solved! Go to Solution.
Hi @roelf,
A simple SUM with filter would resolve the requirement
Total = CALCULATE(SUM('Table'[Sale]),ALLEXCEPT('Table','Table'[Customer],'Table'[Week]))
Please mark this post as an accepted solution if this helped you.
Regards,
Affan
Hi,
In a Matrix visual, drag all columns to the Row labels section. Write this measure
=CALCULATE(SUM(Data[Sale]),ALL(Data[Week])
Hope this helps.
Hi @roelf,
One sample for your reference. Here we need to create a measure as below.
Measure = CALCULATE(SUM(Table1[Sale]),ALLEXCEPT(Table1,Table1[Customer],Table1[Week]))
Also please find the pbix as attached.
Regards,
Frank
Hi @roelf,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank
Hi @roelf,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank
Hi,
In a Matrix visual, drag all columns to the Row labels section. Write this measure
=CALCULATE(SUM(Data[Sale]),ALL(Data[Week])
Hope this helps.
Hi @roelf,
One sample for your reference. Here we need to create a measure as below.
Measure = CALCULATE(SUM(Table1[Sale]),ALLEXCEPT(Table1,Table1[Customer],Table1[Week]))
Also please find the pbix as attached.
Regards,
Frank
Thanks all for the assistance !
Regards
Roelf
Hi @roelf,
A simple SUM with filter would resolve the requirement
Total = CALCULATE(SUM('Table'[Sale]),ALLEXCEPT('Table','Table'[Customer],'Table'[Week]))
Please mark this post as an accepted solution if this helped you.
Regards,
Affan
User | Count |
---|---|
58 | |
58 | |
56 | |
38 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
39 |