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: 
sunitha_chellaiah
Partner - Creator
Partner - Creator

Qlikview script not working in Qliksense

Hi All,

Below mentioned script is working in QlikView, but not working in Qliksense. I want to implement it in Qliksense.

 

CrossTable(Date,Budget,3)
SC1:
LOAD
    Expnese,
    Cat,
    rateofinterest,
    "43194",
    "43225",
    "43257",
    "43288"
FROM [lib://qliksense/Expense.xlsx]
(ooxml, embedded labels, table is Sheet1);
 
 
SC:
load *,
if(Cat='bus' and rateofinterest=10.23,((Budget-rateofinterest)),
   if(Cat='car' and rateofinterest=15.23,((Budget-rateofinterest)))) as bigbudget
 
Resident SC1;
Drop Table SC1;
 
Exit Script;
 
 
1 Solution

Accepted Solutions
avkeep01
Partner - Specialist
Partner - Specialist

It seems that the numbers aren't actual numbers. Could you try replacing the bigbudget field with the following expression in your script. 

if(Cat='bus' and NUM#(rateofinterest)=NUM#(10.23),((Budget-rateofinterest)),
   if(Cat='car' and NUM#(rateofinterest)=NUM#(15.23),((Budget-rateofinterest)))) as bigbudget

View solution in original post

6 Replies
shiveshsingh
Master
Master

Your script will not work in qlikview also.

 

Can you try below script?

 

SC1:

CrossTable (Date,Budget,3)
LOAD
Expnese,
Cat,
rateofinterest,
"43194",
"43225",
"43257",
"43288"
FROM [lib://Desktop/Expense.xlsx]
(ooxml, embedded labels, table is Sheet1);

 


SC:
load *,
if(Cat='bus' and rateofinterest=10.23,((Budget-rateofinterest)),
if(Cat='cat' and rateofinterest=15.23,((Budget-rateofinterest)))) as bigbudget

Resident SC1;
Drop Table SC1;

Exit Script;

sunitha_chellaiah
Partner - Creator
Partner - Creator
Author

No.

That script is working in QlikView.

But in qliksense not getting any value  for bigbudget field.

avkeep01
Partner - Specialist
Partner - Specialist

Hi @sunitha_chellaiah,

Did you check the environment variables, maybe the thousandseperator and the decimalseperator are different in QlikView and QlikSense. So QlikSense doesn't recognize the data from the excel file as a number. 

shiveshsingh
Master
Master

Hi

It seems you have edited the question, previously you took only 3 fields after crosstable condition.

Anyways, someone else will help you..!

 

avkeep01
Partner - Specialist
Partner - Specialist

It seems that the numbers aren't actual numbers. Could you try replacing the bigbudget field with the following expression in your script. 

if(Cat='bus' and NUM#(rateofinterest)=NUM#(10.23),((Budget-rateofinterest)),
   if(Cat='car' and NUM#(rateofinterest)=NUM#(15.23),((Budget-rateofinterest)))) as bigbudget
sunitha_chellaiah
Partner - Creator
Partner - Creator
Author

Thanks!!

It's working