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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mbudiman
Helper III
Helper III

Hide Measure column in Matrix that contains no value

hello,

I have 2 tables, Fiscal_Qtr table and Sales Forecast table. Fiscal_Qtr table contains custom financial quarter period, where a field called Qtr_Sequence_No is used to define sequence of Quarter : 0 means current quarter, -1 means last quarter, -2 means last 2 quarter, 1 means next 1 quarter, 2 means next 2 quarter, etc.
 
There are 5 Measures in Sales Forecast table : 
  1. Forecast : is applicable to all Fiscal Quarter
  2. Shipped : is applicable to Current and Past Quarters only (Qtr_Sequence_No <= 0)
  3. Forecast Variant :  is applicable to Current and Past Quarters (Qtr_Sequence_No <= 0)
  4. Scheduled Ship : is applicable to Current and may be Future Quarters (Qtr_Sequence >= 0 )
  5. Backlog : is appliable to Current and may be Future Quarters (Qtr_Sequence >= 0)
I want to hide the Measure columns if there are no value for specific fiscal qtr. In this Forecast pbix, current Fiscal Qtr is FY26Q1, next fiscal Qtr is FY26Q2, previous Fiscal Qtr is FY25Q4. 'Shipped' measure and 'Forecast Variant' measure contains no value for future fiscal Quarters (FY26Q2), so these columns should be hidden. 'Schedule Ship' and 'Backlog' measures contains no value for past fiscal Quarters (FY25Q4, FY25Q3, etc). 
Question : What is the syntax in Calculation Group to hide Measure column if it contains no value ? Need your advise. Thank you in advance.

forecast.pbix

1 ACCEPTED SOLUTION

You forgot to either expand or go into the next level in the hierarchy. If there isn't a single field of the display column parameter, SELECTEDVALUE returns blank so none in the switch conditions is met. 

danextian_0-1757839229697.png

danextian_1-1757839240039.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

7 REPLIES 7
danextian
Super User
Super User

Field parameters work like pseudo-dimensions that let you switch between measures, but even when a measure has blank values, it will still appear as a separate column. Since your sample PBIX already includes a field parameter, use its field name column as the column header instead of treating it like a measure selector - just ensure to choose Show selected field rather than its values.

danextian_0-1757820545225.png

Then create this measure:

Display_Column_Value = 
SWITCH (
    SELECTEDVALUE ( Display_column[Display_column Order] ),
    0, [forecast qty],
    1, [Shipped qty],
    2, [variant],
    3, [schedule ship],
    4, [Backlog qty]
)

danextian_1-1757820704490.png

 

Please see the attached pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

hi Danextian,

 

The solution works 🙂

So I try to recreate new table matrix according to your advise : 

1. Use the Field parameter as column header and set "Show Selected field"

2. I use the measure you had already created.

However, no value is display in the matrix. Do I miss any step ? Could you help me one more time to point out missing step. I've upload the pbix. The new matrix I created is in the "Test" tab. Thank you in advance for your help.

 

forecast_test.pbix

You forgot to either expand or go into the next level in the hierarchy. If there isn't a single field of the display column parameter, SELECTEDVALUE returns blank so none in the switch conditions is met. 

danextian_0-1757839229697.png

danextian_1-1757839240039.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Got it. Thank you 🙂

Royel
Solution Sage
Solution Sage

Hi @mbudiman You are not allowed to dynamically hide column name in Power BI, you can try with Field Parameters. 

hi Royel, I saw a video on using "Calculation Group" to hide a Measure column conditionally. I need help for DAX statement to achieve my problem scenario above.

lbendlin
Super User
Super User

How would that look like in the UI?

 

You could create a super measure (ie a reference table that lists all the measures, similar to what Field Parameters do) and then return BLANK() as needed which would hide those "columns" - but only if ALL cells are blank for that column/measure.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors