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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Martin1986
Frequent Visitor

Can I create a custom Matrix visual that can hide Values on columns?

Hi,

 

I am working on creating a matrix that shows Actual vs Budget with the actuals on a weekly level and then its totals compared to Budget.

 

However, by default Power BI adds Values to all columns. What I am missing is an option to toggle visibility of certain Values on either Columns+Totals, Columns only or Totals only.

 

To illustrate, I want to go from:

HidingColumnsWeekSpecificMockup.png

 

To:

 

ManuallyHiddenColumnsMockup.png

 

As you can see I already found a workaround, but it is not a recommended workflow for professional use in my opinion. What I did:

- Clear values on weeklevel for Budget, Delta Budget and % values by using HASONEVALUE check with DAX

- Disable Word Wrap on Column headers in Matrix settings

- Shrink all unwanted columns to 0px

- (Temporarily set a default value for those columns to be able to hide them for the coming weeks of the year, otherwise when a new week passes, the columns would be shown again)

 

But this involves manually hiding hundres of columns and I have no idea how reliable this is and that Power BI doesn't suddenly show them again to users when they interact with the report.

One alternative would be to make two tables and place them right after each other, and hide the labels on the second table and keep same order and use 'show empty values' to ensure that they display the same amount of rows, but then I loose my interaction: If I collapse a level in the matrix on the one, it does not collapse on the other.

 

So I would like to learn if this is a use case for designing a custom matrix viz? I have not worked with custom visuals yet. Is this something I could build in a day or two or would it require serious work and specific (programming?) skills?

 

Also, if anyone else knows a better workaround please share as well 😉 A little show & tell on my part as the current workaround might work for some, but I am looking for a more robust solution.

3 REPLIES 3
parry2k
Super User
Super User

@Martin1986  see attached pbix, and use a similar technique to visualize your data

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



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.

Thank you. I think I understand the technique used. But struggling to see how I would use it with dynamic columns (Year-Week) rather than fixed columns?

HI @Martin1986,

Power bi does not support dynamic column based on filter/slicers, maybe you can take a look at following blog to know how to create a custom table that can interact with filters dynamically:

Dynamic Attributes In A Power BI Report 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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