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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Krista
Frequent Visitor

Show values from parent category when child selected

I have student-level data from course evaluations for courses, and I want to be able to compare those ratings (on multiple factors) for a single course to the average ratings from various categories of courses, namely to:

1. the average ratings of the concentration to which the course belongs

2. the average ratings of the program to which the concentration belongs.

 

Courses can be homed within more than one of the parent categories, something like this:

Krista_0-1694621612623.png

What I want:

When a user selects a program and a course from slicers, a bar graph shows the ratings from that course, and the averages for the relevant comparison categories are automatically displayed (either on the same graph or on separate ones), without the user having to select the concentration (because they often don't know to which concentration(s) a course belongs).

 

What is the best way to accomplish this?

 

Currently, I have:

  • a fact table that has one row for each course/concentation/program combination, so that each course can potentially have more than one row, if it belongs to more than one category
  • an unpivoted data table with a column for value (ratings) and one for attribute (the survey questions), with a row being a student/course/semester/survey question

Krista_1-1694623069750.png

 

 

I also have slicers for course, concentration, and program, and this works *okay* but runs into the classic problem of returning blank visuals when the user changes a course without changing its relevant category (because the previous item remains selected). 

 

Is there a better way to model my data to accomplish my goal? Or a DAX trick to make one visual show the other members in a parent category when the child is selected?

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Krista,

According to your description, I'd like to suggest you create an unconnected table as source of slicer.
Then you can write a measure formula to extract the parent level field value and use it as condition to compare with current row context and return flag.
After these steps, you can use it on 'visual level filter' to filter records based on the filter with child level values.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks for your reply, Xiaoxin! 

 

Do you have an example of what the Dax for that measure would look like? I think that is exactly the point where I'm getting stuck - how to extract the parent value.

 

Thanks, 

Krista 

Hi @Krista ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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