Forum Discussion
Classify values into 3 groups
- Anonymous3 years ago
Hi joshua1990 ,
Here are the steps you can follow:
1. In power query – select [Amount] and []Price] – Transform – Unpivot Columns.
2. In power query – select [Value1], [Value2], [Value3]– Transform – Unpivot Columns.
3. Create measure.
Measure = SWITCH( TRUE(), OR( MAX('Table'[Article])="B"&& MAX('Table'[Attribute.1])="Value 1"&&MAX('Table'[Attribute])="Amount", MAX('Table'[Article])="B"&& MAX('Table'[Attribute.1])="Value 1"&&MAX('Table'[Attribute])="Price"), BLANK(), OR( MAX('Table'[Article])="A"&& MAX('Table'[Attribute.1])="Value 2"&&MAX('Table'[Attribute])="Amount", MAX('Table'[Article])="A"&& MAX('Table'[Attribute.1])="Value 2"&&MAX('Table'[Attribute])="Price"), BLANK(), MAX('Table'[Value]))4. Matrix Visual – Fromat – Row headers – Options – stepped layout – set off.
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi joshua1990 ,
Here are the steps you can follow:
1. In power query – select [Amount] and []Price] – Transform – Unpivot Columns.
2. In power query – select [Value1], [Value2], [Value3]– Transform – Unpivot Columns.
3. Create measure.
Measure =
SWITCH(
TRUE(),
OR(
MAX('Table'[Article])="B"&&
MAX('Table'[Attribute.1])="Value 1"&&MAX('Table'[Attribute])="Amount",
MAX('Table'[Article])="B"&&
MAX('Table'[Attribute.1])="Value 1"&&MAX('Table'[Attribute])="Price"),
BLANK(),
OR(
MAX('Table'[Article])="A"&&
MAX('Table'[Attribute.1])="Value 2"&&MAX('Table'[Attribute])="Amount",
MAX('Table'[Article])="A"&&
MAX('Table'[Attribute.1])="Value 2"&&MAX('Table'[Attribute])="Price"),
BLANK(),
MAX('Table'[Value]))
4. Matrix Visual – Fromat – Row headers – Options – stepped layout – set off.
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly