Forum Discussion

am_i_really's avatar
am_i_really
Frequent Visitor
3 years ago

Switch and Multiply

Hi All!

 

I'm looking to write a function similar to the image below:

For example if column one is 20%, I need the values in that row to be multiplied by 1 and so on. Thanks in advance!

1 Reply

  • mlsx4's avatar
    mlsx4
    Memorable Member

    Hi am_i_really 

     

    I would first create a index column as multiplier in Power Query. Pay attention to start with number 1.

     

    And then, use this measure:

    Medida 2 = SUMX(MyTable, MyTable[Value]*MyTable[Multiplier])