Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

AND-Mode Days Between Calculation

I am currently using the AND-Mode option but I noticed that while the correct ticket (DEFECT_ID) numbers are showing, the calculation between the selected dates is not.

When RES_STATUS_AND_MODE  Ready for Validation Prod and Validated Successfully Prod are selected for DEFECT_ID 11112, I should see a turnaround time of 0 days. However, When RES_STATUS Ready for Validation Prod and Validated Successfully Prod are selected for DEFECT_ID 11112, I see a turnaround time of 0 days but this is an OR selection and does not show those tickets that went through Both statuses.

2018-09-24_12-44-22.jpg

The calculated expression value is 20:

SUM(
Aggr(
Max(RES_STATUS_START_DATE)- Min(RES_STATUS_START_DATE)
,
DEFECT_ID)
)
/
Count({$}DISTINCT DEFECT_ID)

2018-09-24_12-47-47.jpg

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe this:

SUM(

Aggr(

Max({<RES_STATUS = $::RES_STATUS_AND_MODE >} RES_STATUS_START_DATE)- Min({<RES_STATUS = $::RES_STATUS_AND_MODE >} RES_STATUS_START_DATE)

,DEFECT_ID)

)

/Count({$}DISTINCT DEFECT_ID)

View solution in original post

12 Replies
swuehl
MVP
MVP

I am not sure I understand.

If  status X and Y is fullfilled for a certain ticket, then X or Y is also fulfilled.

Maybe you are thinking of an exclusive or, XOR?

cbaqir
Specialist II
Specialist II
Author

I need to show the average turnaround time for the 2 selected (RES_STATUS_AND_MODE) steps based on the difference between the RES_STATUS_START_DATE.

From what I read on AND-Mode , this is to show only the tickets that hit both statuses as opposed to one or the other.

swuehl
MVP
MVP

I can't open your QVW right now, but keep in mind that selecting in the AND mode status field does only filter the defect id, it does not filter your status field connected with the start date (at least that's how I assume you've built your model).

swuehl
MVP
MVP

Maybe try something like

SUM(
Aggr(
Max({<RES_STATUS = p(RES_STATUS_AND_MODE)>} RES_STATUS_START_DATE)- Min({<RES_STATUS = p(RES_STATUS_AND_MODE)>} RES_STATUS_START_DATE)
,
DEFECT_ID)
)
/
Count({$}DISTINCT DEFECT_ID)

cbaqir
Specialist II
Specialist II
Author

Yes, I think that is the issue but I don't know how to resolve it. This is a very important requirement for my end user.

cbaqir
Specialist II
Specialist II
Author

I get this in theory but it did not work.

swuehl
MVP
MVP

Maybe this:

SUM(

Aggr(

Max({<RES_STATUS = $::RES_STATUS_AND_MODE >} RES_STATUS_START_DATE)- Min({<RES_STATUS = $::RES_STATUS_AND_MODE >} RES_STATUS_START_DATE)

,DEFECT_ID)

)

/Count({$}DISTINCT DEFECT_ID)

cbaqir
Specialist II
Specialist II
Author

Thank you soooo much! I will have to look to find out what = $:: does.

swuehl
MVP
MVP

That's the scope operator referencing the default state $.

I believe you can actually remove the scope operator (the $:: part), it should work the same in your case.