Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
anitamelbye
Creator
Creator

From IF to Set Analysis (simple)

Hi,

can anyone tell me what I am doing/thinking wrong in this case? I am trying to make a 30-60-90 split on our invoices, sorted by duedate. If i make it with IF's, it works fine, but when trying to write a set analysis, I am obviously doing something wrong.

I thought this


IF(RNREST<>0, IF(DD-RNFDAT<0, RNBELØ,0))


would transfer in to this:


SUM ({<RNREST= {'<> 0'}, [DD-RNFDAT]= {'< 0'}>} RNBELØ)


This should be really easy to get to work, right? Anyone..?

*newbee in love*

Labels (1)
25 Replies
anitamelbye
Creator
Creator
Author

This actually works..


SUM({< RNREST = {'<>0'}, RNFDAT = {'<$(=date(DD-0))'}, RNFDAT = {'>=$(=date(DD-30))'} >} RNBELO )


*newbee feelin' clever*Geeked

Not applicable

Hi Anita

After calling me the BEST I had to come up with something.

Needed to create some data first, can you try

SUM({<RNFDAT={'>$(=date(DD-30)) <$(=DD)'}>}RNBELO)

Maybe change > to >= and/or < to <= as of your business rules

Regards

Juerg

anitamelbye
Creator
Creator
Author

Or .. not.. 😞

Jürg..? 🙂

Edit: I just saw your suggestion.. trying now.. ;:-)

anitamelbye
Creator
Creator
Author

You wrote: SUM({<RNFDAT={'>$(=date(DD-30)) <$(=DD)'}>}RNBELO), and it did not work, but when I swiched places to:

SUM({< RNFDAT={'<=$(=Date(DD))>$(=Date(DD-30))'}>} RNBELO ) it worked 🙂 I dont know why, and I really dont care..

Did you hear? it works... YEAH!

THANK YOU JuergBig Smile

Not applicable

saw it, thanks, so I hope still in love but not a newbee any more, keep qliking!

Not applicable

Hi Anita,

You can use somethig like this as dimension

if(num(DueDate)-num(today())<90,Class(num(DueDate)-num(today()),30,'arrears'),'arrears>=90')