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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.