Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Problem with load script

Hello

Me again, i am not comming right with this:

if([Sale Finalized]='Yes' , if(round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01) < '-0.01'  OR
round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01)>'0.01', 'Difference', 'Reconciling'),
if([Sale Finalized]='No' ,
if("SubSale Deal Type Text" = 'Fixed', 'Fixed',
if("SubSale Deal Type Text" = 'Consignment' and "Sale Deal Type Text" = 'Consignment' , 'Consignment'),
if("SubSale Deal Type Text" = 'Consignment' and "Sale Deal Type Text" = 'Fixed',
if(round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01) < '-0.01'  OR
round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01)>'0.01', 'Difference', 'Reconciling'),
if("SubSale Deal Type Text" = 'Consignment' and "Sale Deal Type Text" = 'MGP', round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01) < '-0.01'  OR
round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01)>'0.01', 'Difference', 'Reconciling'))))) as "Variance Report"

What am i not seeing?

1 Solution

Accepted Solutions
sasiparupudi1
Honored Contributor III

Re: Problem with load script

Please share your qvw so that we could  troubleshoot it for you

16 Replies
MVP
MVP

Re: Problem with load script

Your If Condition Mismatching !

Look into below

if("SubSale Deal Type Text" = 'Consignment' and "Sale Deal Type Text" = 'MGP', round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01) < '-0.01'  OR
round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01)>'0.01', 'Difference', 'Reconciling')))))


IF(something then round(something) or Round(something)) this is wrong


Can you provide your full logic, I will create full if statement for you.

Re: Problem with load script

I didn't get whats the issue is can you please elaborate a bit more on what is happening and what your try to achieve

Re: Problem with load script

if([Sale Finalized]='Yes' , if(round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01) < '-0.01'  OR

round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01)>'0.01', 'Difference', 'Reconciling',

if([Sale Finalized]='No' ,

if("SubSale Deal Type Text" = 'Fixed', 'Fixed',

if("SubSale Deal Type Text" = 'Consignment' and "Sale Deal Type Text" = 'Consignment' , 'Consignment',

if("SubSale Deal Type Text" = 'Consignment' and "Sale Deal Type Text" = 'Fixed',

if(round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01) < '-0.01'  OR

round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01)>'0.01', 'Difference', 'Reconciling',

if("SubSale Deal Type Text" = 'Consignment' and "Sale Deal Type Text" = 'MGP', round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01) < '-0.01'  OR

round(("Return to Grower (GROSS)" - "Return to Grower X"),0.01)>'0.01', 'Difference', 'Reconciling')))))))) as "Variance Report"

Not applicable

Re: Problem with load script

mmm, okay, byt the as "Variance report" is still not blue, meaning the code is not correct yet

Not applicable

Re: Problem with load script

what changed?

MVP
MVP

Re: Problem with load script

Can you provide some information on your If statement.

Something like

Sale Finalized = 'Yes' then

Sales Finalized = 'No' then

etc etc

sasiparupudi1
Honored Contributor III

Re: Problem with load script

Please try

if([Sale Finalized]='Yes',

if(Round(([Return to Grower (GROSS)] - [Return to Grower X]),0.01) < '-0.01' OR round(([Return to Grower (GROSS)] - [Return to Grower X]),0.01)>'0.01', 'Difference', 'Reconciling')

if([Sale Finalized]='No' ,

if([SubSale Deal Type Text] = 'Fixed', 'Fixed',

if([SubSale Deal Type Text] = 'Consignment' and [Sale Deal Type Text] = 'Consignment' , 'Consignment',

if([SubSale Deal Type Text] = 'Consignment' and [Sale Deal Type Text] = 'Fixed',

if(round(([Return to Grower (GROSS)] - [Return to Grower X]),0.01) < '-0.01'  OR

round(([Return to Grower (GROSS)] - [Return to Grower X]),0.01)>'0.01', 'Difference', 'Reconciling',

if([SubSale Deal Type Text] = 'Consignment' and [Sale Deal Type Text] = 'MGP', round(([Return to Grower (GROSS)] - [Return to Grower X]),0.01) < '-0.01'  OR

round(([Return to Grower (GROSS)] - [Return to Grower X]),0.01)>'0.01', 'Difference', 'Reconciling'))))))) as "Variance Report"

Not applicable

Re: Problem with load script

The “as” part does not turn blue

sasiparupudi1
Honored Contributor III

Re: Problem with load script

Please share your qvw so that we could  troubleshoot it for you