Forum Discussion
IF statement for each row
- Anonymous3 years ago
Hi Paritäa ,
According to your description, here are my steps you can follow as a solution.
(1) Enter data.
(2) We can create a calculated column.
Sum of value = SWITCH( [Row name], "0-9.9",SUMX(FILTER('Table (2)',[Value]>=0&&[Value]<10),[Value]), "10-19.9",SUMX(FILTER('Table (2)',[Value]>=10&&[Value]<20),[Value]), "20-29.9",SUMX(FILTER('Table (2)',[Value]>=20&&[Value]<30),[Value]), "30-39.9",SUMX(FILTER('Table (2)',[Value]>=30&&[Value]<40),[Value]), "40-49.9",SUMX(FILTER('Table (2)',[Value]>=40&&[Value]<50),[Value]), "+50",SUMX(FILTER('Table (2)',[Value]>50),[Value]))(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Paritäa ,
According to your description, here are my steps you can follow as a solution.
(1) Enter data.
(2) We can create a calculated column.
Sum of value =
SWITCH(
[Row name],
"0-9.9",SUMX(FILTER('Table (2)',[Value]>=0&&[Value]<10),[Value]),
"10-19.9",SUMX(FILTER('Table (2)',[Value]>=10&&[Value]<20),[Value]),
"20-29.9",SUMX(FILTER('Table (2)',[Value]>=20&&[Value]<30),[Value]),
"30-39.9",SUMX(FILTER('Table (2)',[Value]>=30&&[Value]<40),[Value]),
"40-49.9",SUMX(FILTER('Table (2)',[Value]>=40&&[Value]<50),[Value]),
"+50",SUMX(FILTER('Table (2)',[Value]>50),[Value]))
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Paritäa3 years agoFrequent Visitor
Awesome! Finally some results! I do now face two problems:
1. Two results which are weird, as it produces values with 11 decimal digits:
0-9.9 = 302.49999999999999
20-29.9 = 310.30000000000001
How can it result in these many decimal digits if all my values only have 1 decimal digit?
2. The last range +50, does not produce a result. The cell stays empty, even though I do have two values which are higher than 50... - Paritäa3 years agoFrequent Visitor
So I was able to solve the first problem, it was a formating problem. But I just can't get around the last problem...
- Paritäa3 years agoFrequent Visitor
Found the last problem! Forgot to put a sign in the name, so it didn't recognize where to put it in the table.
Thank you so much for your detailed answer!