Forum Discussion

Paritäa's avatar
Paritäa
Frequent Visitor
3 years ago
Solved

IF statement for each row

Hi everyone!   So I have been working on this problem the whole day and tried so many different ways to solve it but it just won't work! I have a table, each row is a new address which has a value...
  • Anonymous's avatar
    Anonymous
    3 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.