Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
trishita
Creator III
Creator III

How to exclude unwanted data from chart expressions..

I just want to display the values corresponding to Flag1=1 or Sounding Date= Date field.

Which means I  want to exclude:

Flag1<> 0 or Sounding Date<>'Not Corrected within 7 days'

But I am unable to do so

1 Solution

Accepted Solutions
sunny_talwar

Does this look like what you want?

Capture.PNG

View solution in original post

23 Replies
sunny_talwar

Is this a straight table or table box? If this is a straight table, may be use set analysis to exclude.... if this is a table box... may be use straight table instead because you are not able to use calculated dimensions or set analysis to exclude stuff from the table box...

trishita
Creator III
Creator III
Author

Hi Sunny,

I am using straight table as  I have used set analysis here before...

I had used the following code :

Flag1:

If([SOUNDING_START_DATE] >= [SURVEY_DATE] and [SOUNDING_START_DATE] < [SURVEY_DATE] + 7, 1, 0)

and

And in the column Sounding Date I had put the following code:

If(Flag1=1,Date(SOUNDING_START_DATE,'YYYY-MM-DD'), 'Not Corrected within 7 days')


Now  to exclude  the  Sounding Date='Not Corrected within 7 days'


{$<Sounding Date-='Not Corrected within 7 days'>}

But I am having syntax error: Garbage after expression Date

sunny_talwar

May be try this

Only({$<Sounding Date -= {'Not Corrected within 7 days'}>} If([SOUNDING_START_DATE] >= [SURVEY_DATE] and [SOUNDING_START_DATE] < [SURVEY_DATE] + 7, 1, 0))

Also, is that the only expression in your chart? If it is, then you can just check 'Suppress Zero Values' on the presentation tab and 0s from Flag should go away.

trishita
Creator III
Creator III
Author

I am continuously getting an error with whatever syntax I am putting with sounding date

neelamsaroha157
Specialist II
Specialist II

Use Square brackets around the field name

sunny_talwar

Hahahaha

trishita
Creator III
Creator III
Author

I did it..now the syntax is working but the results are not what i want..i just want to exclude certain values or filter out...nothing that complicated..I have used other tools where we had direct filter feature..here i cant find it..is there no easy way to filter out stuff..i used the flag so that ican suppress all the values which i dont need

sunny_talwar

I am not sure what you are talking about? May be if you can share a sample to show what you mean, it might help? Filtering in Qlik is not that difficult (can't really compare to other tools, since I have not used them)... you just have to do it right...

trishita
Creator III
Creator III
Author

I have used this syntax: Only({$<Sounding Date -= {'N'}>} If([SOUNDING_START_DATE] >= [SURVEY_DATE] and [SOUNDING_START_DATE] < [SURVEY_DATE] + 7, 1, 0))

Also attached my qvw..but dont know whats the problem