Forum Discussion
A conditional MAX?
- 9 years ago
acs,
Could you give us a expected chart as the sample? To get the vaule you want, we can use ALLEXPECT function.
TypeTotal = CALCULATE(SUM(Table1[Sales]),ALLEXCEPT(Table1,Table1[Type]))
ProjectTotal = CALCULATE(SUM(Table1[Sales]),ALLEXCEPT(Table1,Table1[Type],Table1[Project]))
VersionTotal = CALCULATE(SUM(Table1[Sales]),ALLEXCEPT(Table1,Table1[Type],Table1[Project],Table1[Version]))Regards,
Charlie Liao
I may not totally understand what you are going for, but if I understand correctly, couldn't you do something like:
TotalSales = CALCULATE(SUM([Sales]),FILTER(BMX,[Month]=MAX([Month])))
- MarcelBeug9 years agoCommunity Champion
My suggestion would be to normalize your source data, either at the real source or in Power Query:
- Put the colour in a separate column.
- De-accumulate Sales figures.
In your example: would the 103 Version 2 Sales include the 98 Version 1 Sales?
Does accumulation start each year in January?
What is your format for Month: text or a date (e.g. first of the month)? This require to de-accumulate the Sales correctly.
- acs9 years agoRegular Visitor
Appreciate the swift replies. Going to try and work my way through both suggestions and see if I can get either to work.
Meanwhile, if it helps:
"In your example: would the 103 Version 2 Sales include the 98 Version 1 Sales?"
No.
"Does accumulation start each year in January?"
Yes (well, not January but at the beginning of our financial year, which is August - so totals run up to 31st July, then reset).