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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
yvonne-c
Creator
Creator

Expression to Calculate average

Hi,

I am trying to calculate the  average figure from the attached  chart to go in a text box

This is the expression used in my chart, any help on how I calculate the average figure from it?

Sum({<[Farm ID]=,[Target Weight]={600}>}Aggr(Sum({<[Farm ID]=>}Quantity)/only({<[Farm ID]=>}[Calculated Cow Course])/only({<[Farm ID]=>}[No Cows]),Product,[Farm ID]))

Thanks

Labels (1)
1 Reply
swuehl
Champion III
Champion III

Would be easier to answer with more context provided, the dimensions in your chart you've used, some details about the data model, how you calculcated the average line.

Maybe (probably not the best solution) something like

=Avg(<[Farm ID]=,[Target Weight]={600}>}

     Aggr(

Sum({<[Farm ID]=,[Target Weight]={600}>}Aggr(Sum({<[Farm ID]=>}Quantity)/only({<[Farm ID]=>}[Calculated Cow Course])/only({<[Farm ID]=>}[No Cows]),Product,[Farm ID]))

, YourChartDimensionField(s)CommaSeparated

))