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
admin11
Memorable Member
Memorable Member

How to hide target bar when no sales amount ?

Hi All

I have sales vs target chart.

Since now April , it have sales and target , it is good to show . 

Since May only have target but no sales , may i know how to hide these bar ?

admin11_0-1618835723365.png

My PBI file :-

https://www.dropbox.com/s/edkfksg0pcf1me6/PBT_V2021_400%20TA_SI.pbix?dl=0

 

Paul

1 ACCEPTED SOLUTION
v-yetao1-msft
Community Support
Community Support

Hi @admin11 ,

A simpler way is to filter the data you want can through visual filter. You said you want to hide the bar that only have target but no sales .That means if the sales is equal 0,the targets will not display also .

So set SALES_  is not 0 in visual filter , you will get the result you want .

Ailsa-msft_0-1618999303155.png

Ailsa-msft_1-1618999303159.png

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

7 REPLIES 7
HarishKM
Impactful Individual
Impactful Individual

@admin11 Hey . Use this 

 

test = if(sales[sales]<> blank(),target[target], Blank() )

Try this it will fulfil your requirement 

v-yetao1-msft
Community Support
Community Support

Hi @admin11 ,

A simpler way is to filter the data you want can through visual filter. You said you want to hide the bar that only have target but no sales .That means if the sales is equal 0,the targets will not display also .

So set SALES_  is not 0 in visual filter , you will get the result you want .

Ailsa-msft_0-1618999303155.png

Ailsa-msft_1-1618999303159.png

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

@v-yetao1-msft 

Thank you for your help.  Your approach using sales is not 0 , does it mean that if I change the setting to sales > 0 , it will also work in theory right ? Then why PBI need to provide sales is not zero ?

@admin11 

If you change the setting to sales > 0 , it will also work . As long as your setting is opposite to 0, it can meet your needs . You can try to set .

@v-yetao1-msft  your approach work fine , many thank.

amitchandak
Super User
Super User

@admin11 ,

if( isblank([sales]), blank(),[target chart])

@amitchandak 

Thank you for sharing.

I am not able to get the field name for TARGET CHART. I get error.

admin11_0-1618837983583.png

 

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.