Forum Discussion
Sum minimum values for all categories
- 9 years ago
Hi Matt, thank you for replying.
Unfortunately, this didn't work for me, it provided the following result
Category Value Current Result Desired Result
a 1 1 1
a 2 2
b 2 2 2
b 2 2
c 4 4 4
c 7 7
I think I found the answer by using the following:
=IF( CALCULATE(min(table[value]), ALLEXCEPT(table[category])) <> table[value], CALCULATE(min(table[value]), ALLEXCEPT(table[category])), 0)
It still isn't ideal because there seem to be multiple min values in some categories and it sums all of them. I used other filters in the calculate formula to continue to exclude values. I might have to go to a rank function to make sure I don't double count minimum values
Try this
sumx(values(table[category]), calculate(min(table[value])))
Hi Matt, thank you for replying.
Unfortunately, this didn't work for me, it provided the following result
Category Value Current Result Desired Result
a 1 1 1
a 2 2
b 2 2 2
b 2 2
c 4 4 4
c 7 7
I think I found the answer by using the following:
=IF( CALCULATE(min(table[value]), ALLEXCEPT(table[category])) <> table[value], CALCULATE(min(table[value]), ALLEXCEPT(table[category])), 0)
It still isn't ideal because there seem to be multiple min values in some categories and it sums all of them. I used other filters in the calculate formula to continue to exclude values. I might have to go to a rank function to make sure I don't double count minimum values