Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Multiply Column by Measure

Thanks to all who reply,

 

I am trying to multiply a column [invoiceprice] by a measure [inventory turns calc] to create a product pricing field.

 

Measure:   Inventory Turns Calc = [market share calc] / SUM('Inventory Turns'[Inventory Turns])

 

This is my DAX:     Product Pricing = [Inventory Turns Calc] * sum(demoChainPrice[invoicePrice])

 

 

 

Can this be done?

Or maybe I can't multiply by the Inventory Turns Calc? 

 

 

Inventory Turns Calc = [market share calc] / SUM('Inventory Turns'[Inventory Turns])

 

Market Share Calc = SUM(replacementsByCounty[replacements])*SUM('Market Share'[Market Share])*.01

 

Thank you,

BLD

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    Yes, it's possible. You can have a try.

    If you need a dynamic result that changes the result based on the slicer's filtering, it's best to create a measure to return the results. Because measures are dynamic and calculated columns are static.

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I also need to mention the Inventory Turns Calc field is a variable. It will change based on the value used in my parameter.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous ,

       

      Yes, it's possible. You can have a try.

      If you need a dynamic result that changes the result based on the slicer's filtering, it's best to create a measure to return the results. Because measures are dynamic and calculated columns are static.

       

      Best Regards,

      Stephen Tao

       

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you.

         

        I did end up with creating the measure below calcuating just the fields all together.

        Seems to be working however the total for each part is always a couple of dollars off. Appears to be a rounding issue. Is there anything I can do to stop the rounding?

         

         

        Product Pricing = (SUM('replacementsByCounty'[replacements]) * 'Market Share'[%] / 'Inventory Turns'[I%]) * sum(demoChainPrice[invoicePrice])