Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

sunitha_chellai
New Contributor

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
Valued Contributor

Re: Qlikview script not working in Qliksense

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
6 Replies
shiveshsingh
Honored Contributor

Re: Qlikview script not working in Qliksense

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_chellai
New Contributor

Re: Qlikview script not working in Qliksense

No.

That script is working in QlikView.

But in qliksense not getting any value  for bigbudget field.

avkeep01
Valued Contributor

Re: Qlikview script not working in Qliksense

Hi @sunitha_chellai,

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
Honored Contributor

Re: Qlikview script not working in Qliksense

Hi

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

Anyways, someone else will help you..!

 

avkeep01
Valued Contributor

Re: Qlikview script not working in Qliksense

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_chellai
New Contributor

Re: Qlikview script not working in Qliksense

Thanks!!

It's working

Community Browser