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
Anonymous
Not applicable

Hiding Columns with 0 Value

Greetings all

I've a table where I put values in it (example below). 

I want to be able to hide Q3-Incentive and Q4-Incentive when we are in Q2. When I enter Q3, then, then I wish to show Q3-Incentive column.

I would appreciate any help or maybe giving me other options.

 

NameQ1-IncentiveQ2-IncentiveQ3-IncentiveQ4-IncentiveTotal
John Doe$2,000$3,50000$5,500
1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

Try to create measures as following:

isShow = 
var _when =dt"2022-6-30"  //set as you want
var _today=TODAY()
return 
IF(MAX('Table'[Date])<=_when,1)
_Value = CALCULATE(SUM([Value]),FILTER('Table',[isShow]=1))

Result:

vangzhengmsft_0-1647831504462.png

Please refer to the attachment below for details.

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

4 REPLIES 4
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

Try to create measures as following:

isShow = 
var _when =dt"2022-6-30"  //set as you want
var _today=TODAY()
return 
IF(MAX('Table'[Date])<=_when,1)
_Value = CALCULATE(SUM([Value]),FILTER('Table',[isShow]=1))

Result:

vangzhengmsft_0-1647831504462.png

Please refer to the attachment below for details.

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , change you measure like this and try

 

if([measure]=0, blank(), [measure])

Anonymous
Not applicable

It didn't work, the column showed as blank. I don't want to see the column at all when it's blank or 0.

 

Anonymous
Not applicable

@amitchandak  those are calculated columns. Can I use the same approach?

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.