Forum Discussion

s15's avatar
s15
Helper III
9 years ago
Solved

Multiply a column with a fixed constant

I cannot seem to find a way to multiple a column with a constant. For example I have total sales. Now I need to set the target is 15%.

The measure would loke like

 

Target Sales = XXX(financials[Sales]) * 15%) + (financial[Sales])

I don't know which function to use in my case.

Thank you

  • Hi s15,


    I just firgured out the way. Instead of 0.15, it must be dividing 100/15 because I cannot seem to find a MULTIPLY function in my case. Math is awesome init'?

     

    Target Sales = SUM(financials[ Sales]) + DIVIDE(SUM(financials[ Sales]),100/15)


    Yes, there is no MULTIPLY function in DAX. The arithmetic operator  * (asterisk) is usually used for multiplication. So you should also be able to simply use the formula below to calculate the Target Sales in this scenario. :smileyhappy: 

    Target Sales = SUM(financials[ Sales]) * (1 + 0.15)

     

    Regards

16 Replies

    • s15's avatar
      s15
      Helper III

      vanessafvg Thank you very much for your response. It seems not work.

       

      I tried with yours as well. I'm not sure if there is a need of add-in or setting enabled. Note that value in Sales column is SUM

       

      • vanessafvg's avatar
        vanessafvg
        Community Champion

        firstl yare you creating a colum or a measure?

         

        I am not quite sure what you trying to do, is a running total?

         

        so  you want to add 15% to the current sales (in a column not a measure?)  ie by row and add that to the original amount?

         

        s15 target sales = ((sumx(financials[sales]) * 15%) + sumx(financials))