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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

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

View solution in original post

16 Replies
MK_QSL
MVP
MVP

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.

avinashelite

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

Kushal_Chawda

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
Author

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

Not applicable
Author

what changed?

MK_QSL
MVP
MVP

Can you provide some information on your If statement.

Something like

Sale Finalized = 'Yes' then

Sales Finalized = 'No' then

etc etc

sasiparupudi1
Master III
Master III

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
Author

The “as” part does not turn blue

sasiparupudi1
Master III
Master III

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