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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Thigs
Helper III
Helper III

Displaying Multiple Columns based on Selection

Hi there!

I am trying to make a bar chart to show student test scores in different areas. I have data that looks like this - 

Student Scores Question 1.PNG

 

Then I made a table that looks like this, mapping each field to its category. 

Student Scores Question 2.PNG

 

I'd like to have a bar chart showing each student's scores, and then be able to filter based on the category in the second table. I feel like it should be easy and I am just missing something. Is there a way to do this without pivoting the data in the first table? I have several formulas/measures already that would be broken by pivoting, so it would not be ideal. 

 

(The actual data has 43 fields and 7 categories, just showing the snippet here). 

3 REPLIES 3
parry2k
Super User
Super User

@Thigs good choice, all the best. We all start from somewhere, the sooner we follow best practices, the easier the solution will be. Cheers!!



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.

parry2k
Super User
Super User

@Thigs First thing first, when you are saying pivot I think you are referring to unpivot . The table shape is already in the pivot format. Having said that, it will be easier if you unpivot (I know you want to avoid it) but that is your best option, the sooner you do it and fix your existing measure, the better off you will be. It is always advisable to go with the best practices of your data rather than finding a way to solve simple reporting with complex DAX functions.  The rest is up to you, fix the table now, or keep working with the current model and try to figure out the solution.

 



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.

That's fair. Walking a complete beginner through some of this and I know he's not going to be happy. Was hoping for an easy alternative, but I will do the correct way. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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