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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression Help

HI All,

@sunny_talwar

I have the follwing dimensions Product Group, Country, Part Type.

I have written the following expression in straight table chart for Market NR:

=sum(Consumption)/sum(aggr(avg([Install Base]),[Product Group],[Part Type],Country))/(sum(TOTAL Consumption)/sum(TOTAL aggr(avg([Install Base]),[Product Group],[Part Type],Country)))

Now this is working when i filter .

For ex i have Affintiti 30 Product Group and Normal part type and country Brazil is selected then value is coming as 196 which is correct:

T.PNG

Now when i un-filter i am getting wrong value as 315:

T.PNG

Can you please help me where i am doing wrong.

Attached qvw.

Thanks,

Bharat

1 Solution

Accepted Solutions
sunny_talwar

Try this

=Sum(Consumption)/Sum(Aggr(Avg([Install Base]),[Product Group],[Part Type],Country))/
(Sum(TOTAL <[Product Group], [Part Type]> Consumption)/Sum(TOTAL <[Product Group],[Part Type]> Aggr(Avg([Install Base]), [Product Group], [Part Type], Country)))

View solution in original post

2 Replies
sunny_talwar

Try this

=Sum(Consumption)/Sum(Aggr(Avg([Install Base]),[Product Group],[Part Type],Country))/
(Sum(TOTAL <[Product Group], [Part Type]> Consumption)/Sum(TOTAL <[Product Group],[Part Type]> Aggr(Avg([Install Base]), [Product Group], [Part Type], Country)))
Anonymous
Not applicable
Author

Thank you Sunny Bhai... Sorry forget to take total only for those 2 fields.I am taking total for all that is wrong.. Thank you so much Sunny Bhai...Thanks...