Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Re: I'm having trouble using a variable!

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

Re: I'm having trouble using a variable!

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

undergrinder
Valued Contributor II

Re: I'm having trouble using a variable!

Hi Ramon,

Try this in load script:

date(date(yourdate)-1) as DATE_OF_CANCELATION

G.

Not applicable

Re: I'm having trouble using a variable!

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.

Community Browser