Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
asinghal0412
Partner - Creator
Partner - Creator

Error in Code Correction

Dear Qlik Community,

I have return a code, the same as below,

=Pick(Match(ValueList('Cycle Time - Man s','Cycle Time - Machine s','JPH - Man N','JPH - Machine N','Make Special Characteristic %','FTQ - Process defect %','Scrap %','OEE %','Number of Operators used N','Make Component Packaging N','Production Operator Skills %','SOS, SOP, JES, OPL process standard %','Maintenance Operators training %','Preparation spare parts %')
,'Cycle Time - Man s','Cycle Time - Machine s','JPH - Man N','JPH - Machine N','Make Special Characteristic %','FTQ - Process defect %','Scrap %','OEE %','Number of Operators used N','Make Component Packaging N','Production Operator Skills %','SOS, SOP, JES, OPL process standard %','Maintenance Operators training %','Preparation spare parts %')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Cycle Time - Man [s]]_MFG_Target]),'#,##0;-#,##0')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Cycle Time - Machine [s]]_MFG_Target]),'#,##0;-#,##0')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[JPH - Man [N]]_MFG_Target]),'#,##0;-#,##0')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[JPH - Machine [N]]_MFG_Target]),'#,##0;-#,##0')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Make Special Characteristic [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[FTQ - Process defect [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Scrap [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[OEE [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Number of Operators used [N]]_MFG_Target]),'#,##0;-#,##0')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Make Component Packaging [N]]_MFG_Target]),'#,##0;-#,##0')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Production Operator Skills [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[SOS, SOP, JES, OPL process standard [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Maintenance Operators training [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
,Num(Max({$<HISTORY_MFG_Target={"$(=Max({$<status_MFG_Target={'PT'}>}HISTORY_MFG_Target))"}>}[Preparation spare parts [%]]_MFG_Target])/100,'##0.0%;-##0.0%')
)

The system gives an error message. It looks like a complex one, but it is not.

Can someone tell me if there is a syntax error in the above expression?

Thanks,

A.S

2 Replies
GaryGiles
Specialist
Specialist

The first thing that jumps out at me is the reference to 

[JPH - Man [N]]_MFG_Target]

Is that the right field name?  You have an extra closed square bracket "]".

Same for

[OEE [%]]_MFG_Target]

 

asinghal0412
Partner - Creator
Partner - Creator
Author

Hi Gary,

Thanks for the response. Actually that entire thing, '[JPH - Man [N]]_MFG_Target]' is a field.

I found the error there was a space missing in one of the fields, thanks for the support.

Best,

Akash