Forum Discussion

Kuri_191's avatar
Kuri_191
Frequent Visitor
3 years ago
Solved

Summarize Table with two categories

Hello community!   Imagine that you have a table with a list of products and each product is given a specific rating (A,B, and C). These products are sold every year (2020 to 2022) and I want to se...
  • ERD's avatar
    3 years ago

    Hey Kuri_191 ,

    Taking your data sample below + DAX to create a table:

     

    Table_3_v2 = 
    ADDCOLUMNS (
        SUMMARIZE ( Table_3, Table_3[Rating], 'Date'[Year] ),
        "Weight",
            DIVIDE (
                CALCULATE ( COUNT ( Table_3[concat1_ (period/rate)] ) ),
                CALCULATE ( COUNT ( Table_3[concat1_ (period/rate)] ), ALL ( Table_3[Rating] ) )
            )
    )