Forum Discussion

DataScope06's avatar
DataScope06
Icon for Helper I rankHelper I
3 years ago
Solved

Sum value by multiple dimensions in multiple tables

I have a data model with several tables. I need to sum the number of items ordered by product category for each customer and each year.   Tables listed here:   sales_items OrderID SKU Qty_o...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi DataScope06 ,

    I have created a simple sample, please refer to it to see if it helps you.

    Create a measure.

    Measure =
    CALCULATE (
        MAX ( sales_items[Qty_ordered] ),
        FILTER (
            ALL ( 'product' ),
            'product'[SKU] = SELECTEDVALUE ( sales_items[SKU] )
        )
    )
    

    The year table has no relationship with other tables, so we cannot output the year column.

     

    Best Regards

    Community Support Team _ Polly

     

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