Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

madeleine_josef
New Contributor III

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

Re: Create the function DueDays

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
5 Replies
MVP
MVP

Re: Create the function DueDays

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

Re: Create the function DueDays

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
madeleine_josef
New Contributor III

Re: Create the function DueDays

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!

Re: Create the function DueDays

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
MVP
MVP

Re: Create the function DueDays

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

Buckets

Community Browser