Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

average networkdays from 2 differents tables

Hello

I have to delay from 2 different table calculated like this :

=Num( Avg({<Décision = {'REFUSE'}>}

NetWorkDays(

Date_Saisie,  Date_Action_nord)),'# ##0 days')

and

=Num( Avg({<[Type de Contact] = {'Refus'}>}

NetWorkDays(

Date_Saisie,  Date_Action)),'# ##0 days')

And I would like to have a single text with the average of the both delay calculated previously.

I tried :

=Num( (Avg({<Décision = {'REFUSE'}>}

NetWorkDays(

Date_Saisie,  Date_Action_nord)) + Avg({<[Type de Contact] = {'Refus'}>}

NetWorkDays(

Date_Saisie,  Date_Action)))/2,'# ##0 jours')

But I don't think that the good way to do it, because we can have more data in a table than the other.

If someone would have an idea, that would be great !

Thank you

Labels (1)
1 Reply
swuehl
Champion III
Champion III

Maybe calculate the average using the sum of your networkdays divided by the count of records, something like

=

Rangesum(

Sum({<Décision = {'REFUSE'}>}NetWorkDays(Date_Saisie,  Date_Action_nord)) ,

Sum({<[Type de Contact] = {'Refus'}>}NetWorkDays(Date_Saisie,  Date_Action))

)

/

Rangesum(

Count({<Décision = {'REFUSE'}>}NetWorkDays(Date_Saisie,  Date_Action_nord)) ,

Count({<[Type de Contact] = {'Refus'}>}NetWorkDays(Date_Saisie,  Date_Action))

)

Maybe you can do the count of your records differently, it might depend on if all records return a value for the NetWorkDays or not.