Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dax help : aggregate values by specific columns

Hi,   I would like to generate "Aggregated_Qty" by adding "column," instead of "measure" in Power BI.   In this case, I would like to base on "Sales Order" and "SKU" to calculated aggregated qty....
  • SpartaBI's avatar
    4 years ago

    Anonymous create this column:

     

    Agg Qty = 
    VAR _site = 'Table'[Site]
    VAR _sku = 'Table'[SKU]
    RETURN
    CALCULATE(
        SUM('Table'[qty]),
        REMOVEFILTERS('Table'),
        'Table'[Site] = _site,
        'Table'[SKU] = _sku
    )

     

     


    Showcase Report – Contoso By SpartaBI