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
tjlaine
New Member

Matrix to hide months without data

I want to create a matrix visual that has following stucture:

 

 ActualActualForecastForecastForecastBudget
 JanFebMarAprMayJun
Sales100120    
COGS8060    

Margin

2060    
Margin %20 %50 %    

 

Matrix rows (on the left) come from individual table and all the measures are actually text values because the last one I must show as percentage. I use switch formula to create this. Matrix columns are hierarchy based on individual table that has text values "Actual", "Forecast" and "Budget" and also month names from my calendar table.

 

I want my end user to select a month that represents the last month that is used for actuals. Next my end user selects how many months is shown for forecast using a slicer that has values from 1-12. Budget will be shown automatically depending how many months are still available for the current year.

 

For example: end user selects May for actuals and 4 months for forecast.

Actuals 1-5

Forecast 6-9

Budget 10-12

 

Everything would be working already with only months on the columns but my end users like to know what type of information is shown for each month. I tried all sort of conditional formatting options and creating new tables but I had no luck.

 

Below you see where I'm at this point. I've got everything to work but I can't hide months that doesn't have values. My matrix shows all months for actuals, forecast and budget. Values are shown correctly for months that follows my selection, others are blank. Trying to filter my measure with blank or empty value doesn't work and I haven't selected "show items with no data" for months.

 

Sieppaa.JPG 

Can anyone give me a hint how to solve this or push me to the correct path? All tips and tricks are appreciated!

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@tjlaine First you don't need to create your measures to text to show different formats, you can use dynamic formatting From Thousands to Billions: The Power of Dynamic Formatting in Power BI - April 2023 Power BI Update...

 

Can you share your measures expression? 



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.

View solution in original post

2 REPLIES 2
tjlaine
New Member

Thank you for the tip @parry2k 

 

After changing my measure to the "Dynamic" everything worked like a charm!

parry2k
Super User
Super User

@tjlaine First you don't need to create your measures to text to show different formats, you can use dynamic formatting From Thousands to Billions: The Power of Dynamic Formatting in Power BI - April 2023 Power BI Update...

 

Can you share your measures expression? 



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.

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.