Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
trishita
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
Anil_Babu_Samineni

Try this final?

If(Output <> 'N', 1)


Where as Output comes from -- Hide From presentation if not required

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


Where as Flag1 comes from -- Hide From presentation if not required

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


Or this as final

If(Not WildMatch((If(Match(If([SOUNDING_START_DATE] >= [SURVEY_DATE] and [SOUNDING_START_DATE] < [SURVEY_DATE] + 7, 1, 0),1)=1,Date(SOUNDING_START_DATE,'YYYY-MM-DD'),'N')),'N'), 1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

Have you checked the attachment?

trishita
Creator III
Creator III
Author

Hi Tresco,

Thanks a lot for the flag 2 option you had inserted.But the problem is that now I am having erroneous date for the two fields computed ROB and Actual ROB.My target was to compute Actual ROB and Computed ROB for a specific Survey Date and a sounding date which falls within the specific condition..when I do seect the sounding date then it appears fine..The below image shows the intended value:

But with the flag what you sent me was:

How can I change the Computed Value or Actual Value only for specific Sounding date then?My target value is this without selecting the sounding date manually.Which means I want to have the exact data without choosing any sounding date from the data....

trishita
Creator III
Creator III
Author

Yes I checked.First of all thanks a lot for the changes you made.That would be one of the things which I would like to see,excluding the unwanted data.Much appreciation.Secondly what I discovered was the data for the fields Computed ROB and Actual ROB are not showing as they should.They are showing sum of fuel for other sounding dates.

How can I change the two quantities Computed ROB and Actual ROB depending on Survey ID, Survey Date and Sounding Date which suffices the following condition(If([SOUNDING_START_DATE] >= [SURVEY_DATE] and [SOUNDING_START_DATE] < [SURVEY_DATE] + 7, 1, 0))..When I have the correct quantity I would delete the unwanted data with flag1 and flag2 discussed by you..

The logic for my actual rob field is:

If(flag2=1,

if (Match([Actual_Fuel_Type],'HSFO'), sum( total  {$<Actual_Fuel_Type={'HSFO'}>}FUEL_MASS_BEFORE_SOUNDING/ 1000),

if (Match([Actual_Fuel_Type],'LSDO'), sum( total  {$<Actual_Fuel_Type={'LSDO'}>}FUEL_MASS_BEFORE_SOUNDING/ 1000),

if (Match([Actual_Fuel_Type],'HSDO'), sum( total  {$<Actual_Fuel_Type={'HSDO'}>}FUEL_MASS_BEFORE_SOUNDING/ 1000),

if (Match([Actual_Fuel_Type],'ULSFO'),sum( total  {$<Actual_Fuel_Type={'ULSFO'}>}FUEL_MASS_BEFORE_SOUNDING/ 1000),'Unknown'

))))

)

sunny_talwar

Is this the same issue we were discussing here?

How to exclude unwanted data from chart expressions..

trishita
Creator III
Creator III
Author

A bit but not fully...but with the same project and some new issues