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

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.

Reply
PowerBIPerson42
Frequent Visitor

Matrix - Use Row values to text search in another column and filter returned matrix values

Hello,

I've been stuck on this for a few days and am grateful for any help!

Right now I have three tables in my data model: A Transcript data table, a Subject list of unique subjects, and a Course Information lookup table.

Within the course information table their is a 'subjects' column where each course has multiple subjects listed. I'm hoping to create a matrix like the example below where the 'subjects' column in the course information table is filtered to results that contain the unique subject listed in each row. The values for enrollments, completions, total hours, etc. would then calculate for courses in the filtered transcript data table that contain the subject.

 

In reality, there are 32 unique subjects and 7 columns to the table so I'm hoping to not write a measure to CALCULATE for every column searching by a subject manually listed.

 

 

SubjectEnrollmentsCompletionsTotal Hours
Leadership1000943850
Software550500480
Project Management620221240
1 ACCEPTED SOLUTION

Hi @parry2k ,

Thank you for your response! I was finally able to figure it out, actually.
My error was in how I was thinking about the subject lookup part of the data model and trying to create a measure or column was not the right approach. 
I ended up using Transform Data to make a duplicate of the course information table and then used Split Column to create a new row for each of the subjects listed on a course. This allowed me to use the new column with one subject per cell as the row value in the matrix - which then filters down the below course information and transcript information by each subject.

I'm fairly new to data modeling and Power BI and sometimes have a hard time determining when to change something in a data model vs when to write a measure vs when to use a filter on a visualization vs etc..


View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@PowerBIPerson42 I would recommend putting sample data in excel file and expected output (which kind of you shown here) and share excel file here, you can share using one drive/google drive and we will able to help to put the solution together.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k ,

Thank you for your response! I was finally able to figure it out, actually.
My error was in how I was thinking about the subject lookup part of the data model and trying to create a measure or column was not the right approach. 
I ended up using Transform Data to make a duplicate of the course information table and then used Split Column to create a new row for each of the subjects listed on a course. This allowed me to use the new column with one subject per cell as the row value in the matrix - which then filters down the below course information and transcript information by each subject.

I'm fairly new to data modeling and Power BI and sometimes have a hard time determining when to change something in a data model vs when to write a measure vs when to use a filter on a visualization vs etc..


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.