Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to create dax measures ?

Hi 

 

Below is my data model,

 

 

I have created a new column called price in Monthly sales logs with this formula,

 

Price = RELATED('SSBC Mereged'[Per Unit Sales price])
 
then I created an additional column in the monthly sales log with the below formula,
 
Sales in USD ($) = 'Monthly Sales Logs'[Qty]*'Monthly Sales Logs'[Price]
 
It's working fine. 
 
I would like to create the above formula in DAX measures. Can anyone advise how to do that? It's not coming.
 
  • Anonymous , sorry try like (a measure)

     

    Sales in USD ($) = SUMX('Monthly Sales Logs', 'Monthly Sales Logs'[Qty]*RELATED('SSBC Mereged'[Per Unit Sales price]))

7 Replies

  • KNP's avatar
    KNP
    Super User

    Anonymous - I may not fully understand the issue but does this work?

     

    Sales in USD ($) = SUMX('Monthly Sales Logs'[Qty]*'Monthly Sales Logs'[Price])

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      KNP No it's not working. Price is coming from a different table called SSBC merged. I created a price column in monthly sales log table b using this formula Price = RELATED('SSBC Mereged'[Per Unit Sales price]). I need to do all the above in dax measures

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , In the measure suggested by KNP , try to replace price and check

         

        example

         

        Sales in USD ($) = SUMX('Monthly Sales Logs'[Qty]*RELATED('SSBC Mereged'[Per Unit Sales price]))