Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

How to use set analysis within a value of network days

Hello community,

I am trying to find the average number of days it takes employees to reach a certain sales milestone. This is calculated by the number of days from the date an individual was trained to the date that milestone was reached. For this I have three fields: TrainedOnDate, MilestoneType, and MilestoneDate.  My expression is as follows

avg(NetWorkDays(TrainedOnDate, day({$<MilestoneType={6}>} MilestoneDate)))/20

In order for me to find the average time it takes to reach a certain milestone type I have to use set analysis on the MilestoneDate field but that is where I am getting the error of "expecting a ')' ". Though I have check to make sure my parenthesis are indeed correct.

Any thoughts on this would be appreciated.

Anthony

1 Solution

Accepted Solutions
Highlighted
Contributor II
Contributor II

Re: How to use set analysis within a value of network days

Thank you Thiago! The second expression worked after appending an ending parenthesis. The final expression should look like:

Avg(Aggr(NetWorkDays(TrainedOnDate, Only({$<MilestoneType={6}>} MilestoneDate)),MilestoneType))/20

View solution in original post

5 Replies
Highlighted
Specialist
Specialist

Re: How to use set analysis within a value of network days

Try this

avg(NetWorkDays(TrainedOnDate,day( Only( {< MilestoneType={6}>} MilestoneDate))))/20

Highlighted
Contributor II
Contributor II

Re: How to use set analysis within a value of network days

This brings up the error "Nested aggregation not allowed"

Highlighted
Specialist III
Specialist III

Re: How to use set analysis within a value of network days

You should try something like this:

Avg(total NetWorkDays(TrainedOnDate, Only({$<MilestoneType={6}>} MilestoneDate))/20


Or


Avg(Aggr(NetWorkDays(TrainedOnDate, Only({$<MilestoneType={6}>} MilestoneDate),MilestoneType))/20

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
Highlighted
Contributor II
Contributor II

Re: How to use set analysis within a value of network days

Thank you Thiago! The second expression worked after appending an ending parenthesis. The final expression should look like:

Avg(Aggr(NetWorkDays(TrainedOnDate, Only({$<MilestoneType={6}>} MilestoneDate)),MilestoneType))/20

View solution in original post

Highlighted
Specialist III
Specialist III

Re: How to use set analysis within a value of network days

Sound's good! Glad to help you

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago