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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

average

hi,

How can i calculate Three Objects average in a Single Expression

Can anyone solve this question.

Thnks

2 Replies
suniljain
Master
Master

can you post the sample data with detail requirement ?

Not applicable
Author

hi, Sunil i provided my screenshot and what expressions used in QlikView file. Please check it. This is very Urgent work i need to complete.

Here i am having 3 barcharts(IMM, Dose, PreCure) and 1 slider for each barchart.

Now when i am working with IMM barchart slider, then i should reflect the changes in "LensMeasurements Barchart"

and also the average of the LensMeasurements Barchart should also changes.

This process should work for all remaining barcharts(Dose, PreCure).

NOTE:

Actually i am using the below condition as Expression in LensMeasurements barchart. But when i am using, it is working fine only for IMMGroup and PreCureGroup but it is not working for DoseGroup. Can you check this expresion once what i written.

=Count({$<[$(=GetCurrentField([LensMeasurementsGroup]))]
=P({<[$(=GetCurrentField([IMMGroup]))]={">=$(g2ImmVar1)<=$(g2ImmVar2)"}>} [$(=GetCurrentField([LensMeasurementsGroup]))]),[CT Key]
=P({<[$(=GetCurrentField([IMMGroup]))]={">=$(g2ImmVar1)<=$(g2ImmVar2)"}>} [CT Key]),[CT Key]
=P({<[$(=GetCurrentField([DoseGroup]))]={">=$(g2DoseVar1)<=$(g2DoseVar2)"}>} [$(=GetCurrentField([LensMeasurementsGroup]))]),[CTKey]
=P({<[$(=GetCurrentField([DoseGroup]))]={">=$(g2DoseVar1)<=$(g2DoseVar2)"}>} [CT Key]),[CT Key]
=P({<[$(=GetCurrentField([PreCureGroup]))]={">=$(g2PreCureVar1)<=$(g2PreCureVar2)"}>} [$(=GetCurrentField([LensMeasurementsGroup]))]),[CT Key]
=P({<[$(=GetCurrentField([PreCureGroup]))]={">=$(g2PreCureVar1)<=$(g2PreCureVar2)"}>} [CT Key])>} [CT Key])

And also same for the Average calculation also it is working fine for two groups IMMGroup and PreCureGroup. But it is not working for DoseGroup, the below Expression i am using for calculating Average.

=num(avg({$<[$(=GetCurrentField([LensMeasurementsGroup]))]
=P({<[$(=GetCurrentField([IMMGroup]))]={">=$(g2ImmVar1)<=$(g2ImmVar2)"}>} [$(=GetCurrentField([LensMeasurementsGroup]))]),[CT Key]
=P({<[$(=GetCurrentField([IMMGroup]))]={">=$(g2ImmVar1)<=$(g2ImmVar2)"}>} [CT Key]),[CT Key]
=P({<[$(=GetCurrentField([DoseGroup]))]={">=$(g2DoseVar1)<=$(g2DoseVar2)"}>} [$(=GetCurrentField([LensMeasurementsGroup]))]),[CT Key]
=P({<[$(=GetCurrentField([DoseGroup]))]={">=$(g2DoseVar1)<=$(g2DoseVar2)"}>} [CT Key]),[CT Key]
=P({<[$(=GetCurrentField([PreCureGroup]))]={">=$(g2PreCureVar1)<=$(g2PreCurerVar2)"}>} [$(=GetCurrentField([LensMeasurementsGroup]))]),[CT Key]
=P({<[$(=GetCurrentField([PreCureGroup]))]={">=$(g2PreCureVar1)<=$(g2PreCurerVar2)"}>} [CT Key])>} [$(=GetCurrentField([LensMeasurementsGroup]))]), '###0.00000')