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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

New Field Help

Hi All,

I need  to build the flowing graph:

Capture.PNG

The filed i have also includes other dates that i wont be using (like 10/1/2016 and so on), I only need to count late 30, late 60 and late 90.

What is the best way to create a new field using only "late" dates?

Please advise.

Capture.PNG

15 Replies
sunny_talwar

Using if statement, may be along these lines:

If(Date - Today() > 90, '90 Days Late',

If(Date - Today() > 60, '60 Days Late',

If(Date - Today() - 30, '30 Days Late'))) as Late_Flag

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Maybe there is no need to create a new field. Use set analysis to restrict dimension values to three specific values only, like in:

=count({<[Expected Remediation Date] *= {'30 Days LATE', '60 Days LATE', '90 Days LATE'}>} WhateverYouLikeToCount)

Note: in set analysis, *= is the combined intersection assignment operator.

Peter

Not applicable
Author

30 60 and 90 is already in the table, i do not need to define from today. how would i write without it?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Nevermind the warnings from the syntax checker. The syntax checker is broken; it doesn't understand compound operators like *= but they do work!

Good luck,

Peter

Not applicable
Author

Hi Peter,

would set analysis work if I add another conditions?

=count({<[Expected Remedition Date]*= {'30 Days LATE','60 Days LATE', '90 Days LATE'}>}{<[Plan_2016]*= {1}>}{<[Vendor Type]*= {'Quality Systems}>}[Expected Remedition Date])

Not applicable
Author

my first bracket is highlighted red

sunny_talwar

Try this:

=Count({<[Expected Remedition Date] *= {'30 Days LATE', '60 Days LATE', '90 Days LATE'}, [Plan_2016] *= {1}, [Vendor Type] *= {'Quality Systems}>}[Expected Remedition Date])

Not applicable
Author

first bracket still red

sunny_talwar

Which bracket are you talking about? Can you highlight it with Red in your next response?