Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Syntax error with set analysis expression

Can anyone tell me what is wrong with my syntax here?

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

I have also added my qvw with this reference

15 Replies
Highlighted
MVP
MVP

Couple of issues:

  • There is no field called 'Sounding Date' in your model. If you are wishing the expression label could be used in set analysis. You are wrong.
  • Had this even be a field, since there is space in between in the name, you have to enclose this field name within '[' and ']' or double quotes (" ")
Highlighted
Creator III
Creator III

But I created an expression called Sounding Date:

Sounding date :

If(Flag1=1,Date(SOUNDING_START_DATE,'YYYY-MM-DD'), 'N')

So cant I use expressions in set analyisi

Highlighted
MVP
MVP

No. That is what precisely I wrote in first point above. You have to use field instead in set analysis.

Highlighted
Creator III
Creator III

I gave a flag called Flag1:

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

Then I created an expression:

Sounding date :

If(Flag1=1,Date(SOUNDING_START_DATE,'YYYY-MM-DD'), 'N')

Lastly I want to show the data for Sounding Date {$<Sounding Date -= {'N'}>}

which means I want to exclude out all date with value N and only display the values for Flag1=1

I dont know whats wrong with my method:

Highlighted
Creator III
Creator III

So what could be a possible solution to only pick those data with flag1=1?

Highlighted
MVP
MVP

Do you wish to suppress all the other rows from the chart ?

Highlighted
Creator III
Creator III

yes i just want to show the data which has the value of flag 1.Something like this

Highlighted
MVP
MVP

PFA

Highlighted
Creator III
Creator III

I also tried to use a calculated dimension using If([SOUNDING_START_DATE] >= [SURVEY_DATE] and [SOUNDING_START_DATE] < [SURVEY_DATE] + 7, 1, 0) and then tried to supress null value from it..Still its not working