Forum Discussion

bmbhelper's avatar
bmbhelper
Regular Visitor
8 years ago
Solved

Calculate - Apply filter based on a IF condition

Hi Guys,   I don't know how to explain or title this. Let me give you my best shot.   I have a set of sales data, I want to create a measure that takes Qty * sale price per sku. Now the Issue is ...
  • v-chuncz-msft's avatar
    8 years ago

    bmbhelper,

     

    Right click [Product] column from Product Table and select Unpivot Other Columns in Query Editor, then add a calculated column to Raw Data.

    Price =
    LOOKUPVALUE (
        'Product Table'[Value],
        'Product Table'[Product], 'Raw Data'[Product],
        'Product Table'[Attribute], 'Raw Data'[Period]
    )
    
    Measure =
    SUMX ( 'Raw Data', 'Raw Data'[Qty] * 'Raw Data'[Price] )