Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist
Specialist

Syntax Help

I have a requirement to show avg number of days from when a generic build resource is populated to when a named resource is populated.

Generic resources = RESOURCE with a  "_" in the name like charges_builder.


Requirement: IGNORE generic name of ccl_consult

Requirement: if no "_" (generic) resource, use start date of COMMITTEE_CAT = "ERC - Assigned" to first date name is populated

One DEFECT_ID could have multiple generics or multiple names for each RESOURCE_TYPE

For example, DEFECT_ID 10811 should show the avg days from ClinDoc Resource and Primary Assignee (even though both happen to be the same name here). I would like to see two values since there are two RESOURCE_TYPES and is should count from the 7/31 date NOT 7/19.

How do I write the expression to give me the time that a specific RESOURCE_TYPE went from generic to named?

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Not sure, but may be this

SUM(

  Aggr(

  Max(FACT_ALM_DEFECT_RESOURCE.START_DATE)- Min({<FACT_ALM_DEFECT_RESOURCE.RESOURCE = {'*_*'}>}FACT_ALM_DEFECT_RESOURCE.START_DATE)

  ,DEFECT_ID)

)

View solution in original post

14 Replies
sunny_talwar

Not sure, but may be this

SUM(

  Aggr(

  Max(FACT_ALM_DEFECT_RESOURCE.START_DATE)- Min({<FACT_ALM_DEFECT_RESOURCE.RESOURCE = {'*_*'}>}FACT_ALM_DEFECT_RESOURCE.START_DATE)

  ,DEFECT_ID)

)

View solution in original post

cbaqir
Specialist
Specialist
Author

2018-08-08_13-05-40.jpg !Thanks Sunny... but something looks off when I pull that in. Here's another version using a Cyclic Group (cResourceTypeResource).

If you select CCL Resource and then a person, the result confuses me.

sunny_talwar

I guess I am not sure I understand what you need. Would you be able to provide the expected output based on few different selections?

cbaqir
Specialist
Specialist
Author

6602.jpg

6602 should show less than a day but I see 27.03 days?

sunny_talwar

But this is showing that the max() is 4/2/2018... do you know why? I am not sure I understand your data well enough to answer this... but may be you know why

cbaqir
Specialist
Specialist
Author

I think your screen shot was meant for someone else.

Perhaps I was using the wrong fields.

I have

DM_STAT_ALM_DEFECT_BUILD_RESOURCE.RESOURCE_TYPE

DM_STAT_ALM_DEFECT_BUILD_RESOURCE.RESOURCE

FACT_ALM_DEFECT_RESOURCE.START_DATE

FACT_ALM_DEFECT_RESOURCE.RESOURCE

FACT_ALM_DEFECT_RESOURCE.RESOURCE_TYPE

cbaqir
Specialist
Specialist
Author

What I need is the avg days for EACH Generic *-* resource until a name was populated other than *-*.

For 6602, I would need one value for CCL Resource, ClinDoc Resource, Enterprise Clinical Informaticist, MPage Resource, Primary Assignee and Rules Resource.

Right now, I only see one calculation for the entire ticket.

sunny_talwar

This is the screenshot I wanted to share

Capture.PNG

sunny_talwar

Since you have two resource field... which one you are planning on using?