Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have data similar to the following tables containing category hierarchy and sales quantity by items.
I want to create a hierarchy based on the product category and filter the sales quantity table by it.
i.e
Category
A
B
C
Solved! Go to Solution.
Hi @Ahmaddaniyal ,
Here are the steps you can follow:
1. Enter Power query, select [Category hierarchy 1], [ Category hierarchy 2], [ Category hierarchy 3] - Unpivot Columns of Table.
2. Right-click the newly generated [Attribute] - Remove.
Result:
3. Check [Value] - Sort Ascending - uncheck its blank.
Result:
4. Home – Merge Queries -- Merge Queries as New.
5. Open the new table formed, click Expand next to Table2, and select [SalesPerson] and [SelesQuantity].
6. 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 @Ahmaddaniyal ,
Here are the steps you can follow:
1. Enter Power query, select [Category hierarchy 1], [ Category hierarchy 2], [ Category hierarchy 3] - Unpivot Columns of Table.
2. Right-click the newly generated [Attribute] - Remove.
Result:
3. Check [Value] - Sort Ascending - uncheck its blank.
Result:
4. Home – Merge Queries -- Merge Queries as New.
5. Open the new table formed, click Expand next to Table2, and select [SalesPerson] and [SelesQuantity].
6. 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
but it does not resolve my issue to filter by categories.
A
B
C
as mentioned in the dataset
@Ahmaddaniyal , Unpivot the category in the first table, that will all categories in row for the item, That will make analysis easy. But will create a many to many join
https://radacad.com/pivot-and-unpivot-with-power-bi
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |