Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Matrix Category and Subcategory

I need to setup a matrix to show categories of items. Some of the categories have subcategories, and some do not. My dataset has a field for "Category" and a field for "Subcategory". Right now I have Subcategory defaulting to null if there isn't one. 

 

Currently it looks like this

smileamile_0-1605629114640.png

 

However, I don't want it to expand to another level if there isn't a subcategory, so it'd look more like this

smileamile_1-1605629542905.png

 

1 ACCEPTED SOLUTION
ChrisMendoza
Resident Rockstar
Resident Rockstar

Have you taken a look at the techniques described at https://www.daxpatterns.com/parent-child-hierarchies/# ?






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
ChrisMendoza
Resident Rockstar
Resident Rockstar

Have you taken a look at the techniques described at https://www.daxpatterns.com/parent-child-hierarchies/# ?






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

@ChrisMendoza Oh wow that is great! Thanks so much. One question though - how does the Entity table join to the StrategyPlan table? I keep getting a circular reference error when I try to join on Category to Level2 and Subcategory to Level3

@Anonymous - Hard to tell without knowing your data model; honestly even if I saw it I'm not sure I'd be able to provide a sufficient response. In my model, I do remember that I did have a similar issue though. If I recall, I had to create 'bridge' tables and when creating the relationship it actually mattered which started the connection and which ended the connection; hopefully that makes sense and helps you.

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.