Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Suppress Dimension if All Expressions Do Not Return Values

Hello,

I have a bar chart with one Dimension (Job Title) and two Expressions (avg(Hourly Rate) and (avg(Day Rate). I only want to see the dimension when it returns values for both expressions.  How is this accomplished?  I tried a select in field action as well so that the entire sheet would filter if the two expressions were true on sheet activate, but that didn't work. Please advise.

1 Solution

Accepted Solutions

Re: Suppress Dimension if All Expressions Do Not Return Values

Hi

Please check the attached file. Hope it helps

8 Replies

Re: Suppress Dimension if All Expressions Do Not Return Values

hi

try like this

if(avg(Hourly Rate) <>0 and avg(Day Rate) <> 0, avg(Hourly Rate))

if(avg(Hourly Rate) <>0 and avg(Day Rate) <> 0, avg(Day Rate))

So its display if both condtion is satisfy oly

hope it helps

Not applicable

Re: Suppress Dimension if All Expressions Do Not Return Values

Thanks for the quick reply Mayil. This didn't work, unfortunately. See attached screenshot.Capture.JPG

Re: Suppress Dimension if All Expressions Do Not Return Values

Hi

Can you post a sample file?

Not applicable

Re: Suppress Dimension if All Expressions Do Not Return Values

Try the folloing as your dimension:

Aggr(if(avg(Hourly Rate) <>0 and avg(Day Rate) <> 0,Job_Title),Job_Title)

Regards

RL

Not applicable

Re: Suppress Dimension if All Expressions Do Not Return Values

Thank you as well. Unfortunately that did not work for me either. Please see the attached example where I would want to suppress the Accounting Assistant job title from the chart because it does not have any Daily Rates data to show.

Re: Suppress Dimension if All Expressions Do Not Return Values

Hi

Please check the attached file. Hope it helps

Not applicable

Re: Suppress Dimension if All Expressions Do Not Return Values

Thanks!

danielact
Contributor III

Re: Suppress Dimension if All Expressions Do Not Return Values

Another way to do it is with this expression:

=Aggr(if(isnull(avg(Hourly_Rate)) =0 and isnull(avg(Daily_Rate)) = 0,Job_Title),Job_Title)

The issue earlier was that you were using zero in your logic. It was blank, meaning a null value, not zero.

Community Browser