Forum Discussion
Petri
3 years agoFrequent Visitor
Displaying cross sectional data in one visual
This is a conceptual question on how to best organize the data to get one visual used by several tables. In other words, aggregating data compactly in one place instead of showing 20 different tables...
v-yanjiang-msft
Community Support
3 years agoHi Petri ,
According to your description, here's my solution.
1.For CategoryA, CategoryB table, select Category1 and Category2(or Level1 and Level2) columns at the same time and click Unpivot. Then the category name in one column and the values in another column.
2.Create two tables.
Category table:
Product table:
Then make relationship between tables like this:
3.Create a measure:
Measure =
SWITCH (
SELECTEDVALUE ( 'Category'[ProductCategory] ),
"A",
MAXX (
FILTER ( 'ProductA', 'ProductA'[ProductName] = MAX ( 'Product'[ProductName] ) ),
'ProductA'[Value]
),
"B",
MAXX (
FILTER ( 'ProductB', 'ProductB'[ProductName] = MAX ( 'Product'[ProductName] ) ),
'ProductB'[Value]
)
)
Put ProductName from Product table in Rows, Category from Category table in Columns and the measure in Values.
Get the result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.