Forum Discussion

Bambroo69's avatar
Bambroo69
Frequent Visitor
3 years ago

RELATED NOT WORKING with a Measure

Hello, I am trying to calculate the revenue using [Quantity Sold] *Products[product_retail_price].

Quantity Sold Measure= SUM(Transaction_Data[quantity])
Product_retail_price sits in another product table.
 
But, Power BI Doesn't give me an option to use [Quantity Sold]* Related(Product_retail_price). Is it because Related Function needs some sort of row context? Also, I am able use this under below DAX. Is it because SUMX is providing a row context by scanning Transactions table row by row?
Revenue= SUMX(Transaction_Data,[Quantity Sold]*Related(Products[product_retail_price]))
 

 

1 Reply

  • Bambroo69 do this:

     

    Revenue= SUMX(Transaction_Data,Transaction_Data[Quantity]*Related(Products[product_retail_price]))