Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Problem of Average Total%

Dear all

Kindly advise why the average total% cannot be computed as 20%, 16.7% is wrong.

Thank you, Tracy

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, you can ignore factories without rental adding the condition:

Avg({<Factory={"=Sum([Rental])<>0"}>} Aggr(Sum([Rental]/Sum(total Rental)), Factory))

Avg({<Factory={"=Sum([Rental])<>0"}>} TOTAL Aggr(Sum([Rental]/Sum(total Rental)), Factory))

View solution in original post

2 Replies
rubenmarin

Hi, you can ignore factories without rental adding the condition:

Avg({<Factory={"=Sum([Rental])<>0"}>} Aggr(Sum([Rental]/Sum(total Rental)), Factory))

Avg({<Factory={"=Sum([Rental])<>0"}>} TOTAL Aggr(Sum([Rental]/Sum(total Rental)), Factory))

tracycrown
Creator III
Creator III
Author

Dear Mr Rubenmarin

Thank you very much for advising such an excellent method which helps to solve many current issues still have not posted yet. You are so knowledgeable and experienced in Qlik, hope to learn from you more in future.

Many Thanks , Tracy