Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Multiply values in the column with measures based on another column

Hi everyone,

 

My task is to multiply values in a column based on the corresponding column with measures regarding to it.

I have 4 measures regarding to the Type column.

MeasureA = 4

MeasureB = 3

MeasureC = 1

MeasureD = 5

Here is an example of the value in a column.

What I want is that I want a matrix showing the type of each set and then also show the value of NumberTypeA*MeasureA + NumberTypeB*MeasureB + NumberTypeC*MeasureC + NumberTypeD*MeasureD separately for each set.

 

Thank you for your help.

 

  • Hi Anonymous,

     

    You can use SWITCH function, just like:

    = SWITCH([Type], "A", [Number]*[MeasureA], "B",[Number]*[MeasureB], "C",[Number]*[MeasureC],"D",[Number]*[MeasureD],BLANK() )  

    If you still have some question, please don't hesitate to let me known.‌‌

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

4 Replies

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey Anonymous ,

     

    I have a few questions.

    What exactly should MeasureA, MeasureB, MeasureC and MeasureD  calculate? From the table you show I could not understand your expected result.

     

    Can you show the result matrix that you want to archive? The description let's room for interpretation and I want to be clear on the output.

     

    Thank you and best regards

    Denis Selimovic

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    According to this, right now I already have 4 measures, but I don't know how to multiply with the values in the number column based on the type column

     

    Thank you for your response!

     

    • v-xulin-mstf's avatar
      v-xulin-mstf
      Icon for Community Support rankCommunity Support

      Hi Anonymous,

       

      You can use SWITCH function, just like:

      = SWITCH([Type], "A", [Number]*[MeasureA], "B",[Number]*[MeasureB], "C",[Number]*[MeasureC],"D",[Number]*[MeasureD],BLANK() )  

      If you still have some question, please don't hesitate to let me known.‌‌

       

      Best Regards,

      Link

       

      Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you for your answer!