Forum Discussion
Kuri_191
3 years agoFrequent Visitor
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...
- 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] ) ) ) )
ERD
Community Champion
3 years agoHey 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] ) )
)
)
- Kuri_1913 years agoFrequent Visitor
It worked! Thanks!