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
CMSGuy
Helper III
Helper III

"Hide" column in matrix with no data

I know this has been asked and answered, but I have not yet found a solution.  I have a matrix whose datasource is coming out of a datawarehouse.  The datawarehouse has 40 columns named Task1Name, Task2Name...Task40Name.  There are some instances where groups of data WILL use all of these Task columns, however most use much less and some use more than others.  Is there a way to NOT show, or hide, or not even select the columns in the Query, if there is not Name data for that field?

 

Thanks for the information

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You should unpivot your data, so that your 40 column turn into two columns (task name and task value). You can then filter out any blank/null rows. In your matrix visual, you can use the task name column in the column field well to repivot your data showing only the columns that have data.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

You should unpivot your data, so that your 40 column turn into two columns (task name and task value). You can then filter out any blank/null rows. In your matrix visual, you can use the task name column in the column field well to repivot your data showing only the columns that have data.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


So I would unpivot at the query level then?

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.