Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello Team,
I've a product Hierarchy like this.
Category->Sub Category->Product Name.
Few Categorirs have Sub Categories but not Products,
Few Categories have Products but not Sub Categories. And the data looks like this.
For Accessories there's no Sub category but Products are there.In my output I want to see Accessories followed by the Acceessories Products but not the Blank.
I'm using the below DAX
In my output I want to see Accessories followed by the Acceessories Products.And for the rest of the Category the output is correct.
Let me know how to achieve this.
TIA
Solved! Go to Solution.
Heya @likhitha2705 ,
See attached file. I've simply created two calculated columns as previously mentioned. However, if your data is too big, if you have thousands of entries and tenths of these blank situations then you may want to consider a different approach. Never the less, the cleaner the hierarchy, the cleaner the output.
Hi @MNedix
Thanks for the reply .Somehow I'm little confused with your solution. If possible can attach the pbix file for the above.
TIA
Category | Sub Category | Product Name | Sales |
Accessories | Bike Wash | 1000 | |
Accessories | Fender Set | 2000 | |
Accessories | Helmet | 3000 | |
Bikes | Mountain Bikes | 2500 | |
Bikes | Road Bikes | 3000 | |
Bikes | Touring Bikes | 4500 | |
Clothing | Caps | Logo Cap | 5000 |
Clothing | Gloves | Finger Gloves | 4300 |
Clothing | Jerseys | Long Sleeve Jersey | 3500 |
Heya @likhitha2705 ,
See attached file. I've simply created two calculated columns as previously mentioned. However, if your data is too big, if you have thousands of entries and tenths of these blank situations then you may want to consider a different approach. Never the less, the cleaner the hierarchy, the cleaner the output.
Hi @MNedix
Thanks for the reply .Somehow I'm little confused with your solution. If possible can attach the pbix file for the above.
TIA
Category | Sub Category | Product Name | Sales |
Accessories | Bike Wash | 1000 | |
Accessories | Fender Set | 2000 | |
Accessories | Helmet | 3000 | |
Bikes | Mountain Bikes | 2500 | |
Bikes | Road Bikes | 3000 | |
Bikes | Touring Bikes | 4500 | |
Clothing | Caps | Logo Cap | 5000 |
Clothing | Gloves | Finger Gloves | 4300 |
Clothing | Jerseys | Long Sleeve Jersey | 3500 |
Heya,
To be sure you get accurate and correct results from your data you should clean it up first and make it consistent across the tables. The first thing you should do is complete/clean-up your hierarchy: create calculated Sub-Categories for orphan Products and add Products where you have none.
For example, you could use a Switch function to create a Subcategory from Products - for example:
Sub-Category =
SWITCH(
TRUE(),
[Product] = "Bike Wash", "Bike accessories",
[Product] = "Fender Set", "Bike accessories",
[Product] = "Helmet", "Bike accessories")
You can also create a Product from Sub-Category, like this:
Product=
IF(ISBLANK([Product]),[Sub-Category])
The above will allow you to:
1. Clean up the orphan Products.
2. Have prices correctly associated with Products rather than Categories or Sub-Categories
Then you could start building a proper hierarchy structure, calculate the PATH and use ISINSCOPE to correctly display the table/values.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.