Forum Discussion

Thigs's avatar
Thigs
Helper IV
2 years ago

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 - 

 

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

 

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

  • 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.

     

    • Thigs's avatar
      Thigs
      Helper IV

      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. 

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