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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kjcompton
Frequent Visitor

Multiple Queries to Make Dynamic Report

I am trying to make a dynamic report where my end user can select their specific columns that they want to report on, and we are doing this because if you select all the columns you are looking at 60+ columns and it makes the report hard to look for data. Here are the steps that I have done. 

1. I did was I made a table with all the columns that are available/what the requester would like to report on, and I grouped them in categories as shown below:

kjcompton_0-1663167696997.png

2. After I did this I brought that into a Hierarchy Slicer (as this will allow pick and choose of columns). 

kjcompton_3-1663168138625.png

 

3. I then took all my separate queries (6) and unpivoted them so they could all relate to my main table (here is the linkage)

kjcompton_1-1663167833440.png

4. I then brought in a matrix table, but the issue here is each query that I unpivoted now has its own CaseID/EncounterID under the "rows" section of the matrix, under columns I had to bring in 6 different "originalcolumnnm" and under values I brought in the six different "first values", but the out put doesn't work. It just says "first value" across the top.

kjcompton_2-1663168051613.png

My question is how do I make this interactive and show the columns that I need with all these different queries? I feel there has to be an easier way... I appreciate everyone's help with this!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @kjcompton ,

 

According to your statement, I think you only add columns into matrix column field and value field. I think you need to expand your matrix by adding columns in matrix row field.

I think your data table should look like an unpivot table. I suggest you to add an index before your unpivot or add an index by group after unpivot.

For refernece:

Add an index column

Create Row Number for Each Group in Power BI using Power Query

Your table should look like as below.

RicoZhou_0-1663223180655.png

Matrix is as below.

RicoZhou_1-1663223584557.png

 

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @kjcompton ,

 

According to your statement, I think you only add columns into matrix column field and value field. I think you need to expand your matrix by adding columns in matrix row field.

I think your data table should look like an unpivot table. I suggest you to add an index before your unpivot or add an index by group after unpivot.

For refernece:

Add an index column

Create Row Number for Each Group in Power BI using Power Query

Your table should look like as below.

RicoZhou_0-1663223180655.png

Matrix is as below.

RicoZhou_1-1663223584557.png

 

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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