Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I'm having trouble using a variable!

Hi! I'm new in Qlik Sense, I've been trying to do the following but I can't.


The date and date of cancellation is composed by YEAR-CAMPAIGN (YYYYCC)

The date of cancellation is registered on the date of the order (date) like the following

 

DATEDATE OF CANCELLATIONORDERS
2015172015186,029.00
2015182015193,211.00
2015192015203,370.00
2015202015214,513.00
2015212015224,094.00

but I need to do this:

   

DATEDATE OF CANCELLATIONORDERS
201517
2015182015186,029.00
2015192015193,211.00
2015202015203,370.00
201521201521

4,513.00

I've been trying somethin like this:

DATE_OF_CANCELATION={#(=DATE)}

But is not working, could you please help me?

4 Replies
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

Not sure how DATE_OF_CANCELATION and DATE are related in your datamodel.

sample QVF might be helpful...

You can try this as a expression..

if(DATE_OF_CANCELATION = DATE, sum(ORDERS))

assuming both of those fields are in NUMBER format. if not use num(FIELD) as FIELD in your script.

Thanks,
Phani

ramoncova06
Specialist III
Specialist III

I would have to see the data, but couldn't you create a calculated dimension with DATE OF CANCELLATION = (DATE-1)

undergrinder
Specialist II
Specialist II

Hi Ramon,

Try this in load script:

date(date(yourdate)-1) as DATE_OF_CANCELATION

G.

Not applicable
Author

Thanks everyone for your help I've solved it with the redefinition of my data it was a better solution rather than using an expression.