Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Class with dates

Hi Community:

I am trying to make a chart that looks like the following:

wantclass.png

Here is my data.  I am using the OPEN_QN_FLG field from the QN table and SRC_CREATE_DTTM field from the Squawk table.

layout.png

openqnflag.pngsrc_create.png

The SRC_CREATE_DTTM is in number format and is the date that the quality notification (QN) was opened.  The OPEN_QN_FLG field shows a 1 if the notification is still opened, and a 0 if it is closed.  For my chart, I am only interested in the open QNs, or 1s. 

This is the chart I am getting, and can't figure out how to fix it:

openqns.png

hi.png

HIII.png

I commented out a lot of lines just because I have tried a lot of stuff and cannot get anything to work right.  I put the num in front of TODAY so that it is in the same format as the SRC_CREATE_DTTM.  Since the SRC_CREATE_DTTM has so many decimals, I used FLOOR in order to get rid of them.

I ideally do not want to change anything in the back end, if possible, because someone else is working on that as I design the front end.  However, if that is the only option we can work together to add to that.

Thanks!

11 Replies
MarcoWedel

Hi,

although you already solved it on your own, one solution might be also to combine the class() and the dual() functions to avoid sorting issues:

=If(Today()-Floor(SRC_CREATE_DTTM)>=90,Dual('90+',90),Dual(Replace(Class(Today()-Floor(SRC_CREATE_DTTM),30),'<= x <','-'),Class(Today()-Floor(SRC_CREATE_DTTM),30)))

QlikCommunity_Thread_185722_Pic1.JPG

hope this helps

regards

Marco

beskqlik
Contributor II
Contributor II

HI 

I have same problem,

 

But i need this buckets with filter column with date. When i select this date  from that date i should get past 90 days and bucketing should happen. Was your solution is with filter column.If yes, Can you please share it