Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create the function DueDays

Hello,

Iam wondering if I can create a field of my own called DueDays in the data load editor in QlikSense?

I have in my data a field cllaed InvoiceDueDate, can I use this to calculate a new field called DueDays?

Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

No problem. Something like this should do the trick:

LOAD

     InvoiceID,

     InvoiceDueDate,

     Interval(InvoiceDueDate - Today(),'d') as DueDays,

     ... other fields...,

FROM

     ...source...

     ;


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
swuehl
MVP
MVP

Sure, you can create as many new fields as you like, how do you want to calculate the new field's value?

Gysbert_Wassenaar

No problem. Something like this should do the trick:

LOAD

     InvoiceID,

     InvoiceDueDate,

     Interval(InvoiceDueDate - Today(),'d') as DueDays,

     ... other fields...,

FROM

     ...source...

     ;


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thank you, I have added the Interval you suggested.

Now my next question, I want to create a measure using the duedays. See attached picture for the example.Capture1.PNG

This example is taken from QlikView and I want to create the same thing in QlikSense.

The coding in QV is: if (DueDays>1 and DueDays<=10 and ARCreatedDate=vtodayDate, ARBookRVal))

But I have no fields called ARCreated Date or ARBookRVal.

The fields I have are:

LOAD
    AlfaCompany,
    InvoiceNumber,
    InvoiceSum,
    InvoiceDueDate,
    Interval(InvoiceDueDate - Today(),'d') as DueDays,
    CustomerNumber,
    InvoiceCurrency,
    CustomerName,
    InvoiceSumCompanyCurrency,
    AROfficialSerNr,
    ARARRebDate2,
    InvoiceSumGroupCurrency

Thank you in advance!

Gysbert_Wassenaar

I'm afraid the picture you posted doesn't make things clearer. I have no idea what the AR* fields are. Perhaps you have an InvoiceDate you can use. And InvoiceSum might be the field you want to use instead of ARBookRVal. But I don't know your data...


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

Looks like you want to create buckets from your DueDays, here are some methods explained to do this:

Buckets