Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
Highlighted
cbaqirdhds
Valued Contributor

Class Function with Max Interval?

I am using a class function that shows =class(WORKFLOW_DURATION,30,WORKFLOW_DURATION) .

I want the largest interval to show >120. Rather than 120 - 150, etc... How can I do this?

Thanks,

Cassandra

Tags (3)
1 Solution

Accepted Solutions

Re: Class Function with Max Interval?

Oh I understand why it is doing this:

May be try this:

Dual(

          If(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION), '>120'),           If(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION), 150)

)

29 Replies

Re: Class Function with Max Interval?

May be this:

=If(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION), '>120')

cbaqirdhds
Valued Contributor

Re: Class Function with Max Interval?

Thanks, Sunny. Then how would I sort it so that >120 comes after the other intervals?

Re: Class Function with Max Interval?

Try this:

Dual(If(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION), '>120'), Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION))

cbaqirdhds
Valued Contributor

Re: Class Function with Max Interval?

That doesn't look quite right...

1-21-2016 9-05-52 AM.jpg

Re: Class Function with Max Interval?

Oh I understand why it is doing this:

May be try this:

Dual(

          If(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION), '>120'),           If(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION), 150)

)

cbaqirdhds
Valued Contributor

Re: Class Function with Max Interval?

Thanks, Sunny!

cbaqirdhds
Valued Contributor

Re: Class Function with Max Interval?

Any idea why the interval shows 3 numbers? What does the middle number mean - an average or something?

1-21-2016 12-36-58 PM.jpg

Re: Class Function with Max Interval?

I think you have specified the x to be replaced by WORKFLOW_DURATION

2016-01-21 14_43_28-New Text Object.png

Class(WORKFLOW_DURATION, 30, WORKFLOW_DURATION), '>120')


Change the third argument to make it something static (QlikView ‒ class - script and chart function)


Capture.PNG

cbaqirdhds
Valued Contributor

Re: Class Function with Max Interval?

For some reason, I am getting the same REQUEST_ID counted multiple times and not sure why. I would only expect it to be counted once in 60-90 since the duration is 70 days. Any idea? I am thinking I need to use something like this: =class(Sum(total WORKFLOW_DURATION),30)

Dimensions:

  • dPgmPm (a group)
  • =DualIf(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30), '>120'),  If(WORKFLOW_DURATION <= 120, Class(WORKFLOW_DURATION, 30), 120) )
  • =if(match(CUR_WORKFLOW_STEP_NAME,'Project Initiation and Design', 'Project Quality Review', 'Planning', 'Implementation', 'Close Out')>0,CUR_WORKFLOW_STEP_NAME,null())

Expression: count(DISTINCT REQUEST_ID)

1-21-2016 3-18-43 PM.jpg

1-21-2016 3-22-20 PM.jpg