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: 
Not applicable

Error in Expression

Good day,

I am trying to use this expression below, but it shows me that there is an error in the expression.

What i am trying is really simple, i want that QV count the networkdays between TS.CorrectOne and Date_Time1 that are equal or higher than 5.

count(distinct if(networkdays(avg(TS.CorrectOne),avg(Date_Time1)) >= 5 , TS.Voyage))

Is there any other posibility or am I doing something wrong?

Just for information, these two fields are not in the same table.

Regards,

1 Solution

Accepted Solutions
Not applicable
Author

I found it, i use this formula and worked:

count(aggr(if(networkdays(avg(TS.CorrectOne),avg(Date_Time1)) >= 5,Count(distinct TS.Voyage)),Month,TS.Voyage))

Rgds,

Jorge

View solution in original post

4 Replies
Not applicable
Author

Any sugestion my friends?

Rgds,

Jorge

Sokkorn
Master
Master

Hi Jorge,

Try this if(networkdays(avg(TS.CorrectOne),avg(Date_Time1)) >= 5 , COUNT(DISTINCT TS.Voyage))

Regards,

Sokkorn

Not applicable
Author

Tks Sokkorn, but I already try this expression, the problem with this is that it gives me the total number and without the condition.

I am here trying to think in another condition expression, but i can't find any.

I will try to join these two fields into one table and create this expression in script, probably it will work.

Not applicable
Author

I found it, i use this formula and worked:

count(aggr(if(networkdays(avg(TS.CorrectOne),avg(Date_Time1)) >= 5,Count(distinct TS.Voyage)),Month,TS.Voyage))

Rgds,

Jorge