Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Tommkasper
Contributor
Contributor

How to use an average of a group for comparison in a chart

Hi everyone!

I'm relatively new to Qlik Sense, and I can't figure this one out.

I'm trying to show the average kilo's per product group of a group compared to a single member of that same group.

Example dataset:
Customer        Productcategory       Kilo         CustomerGroup
A                          WWW                              10             RR
A                          TTT                                  15             RR
B                          WWW                              5               SS
C                          WWW                              22            RR

When filtering on customer A, I'm looking to show their kilo's in their product categories(i.e. 10 in WWW and 15 in TTT), which is a normal bar-chart and this one works fine. 
In another chart I want to show the average of the customers belonging to group RR, so for Customergroup RR the average of WWW would be 16(10+22/2) and for category TTT the average would be 15. Because I only have 1 datapoint for Productcategory TTT in Customergroup RR.

Hope I explained it well.

Labels (3)
1 Solution

Accepted Solutions
Andrea_Bertazzo
Support
Support

Hi Tommsasper,

 

Thanks for the question. If I understand it correctly, you can get the result you need by using Set Analysis. An expression like this should work:

Avg({$<CustomerGroup = {RR}>} Kilo).

The {$<CustomerGroup = {RR}>} part is how you can define the set of data to consider for you formula.

If you are new to Set Analysis, I would encourage you to invest some time to get familiar with this extraordinary powerful feature that can be used in QlikView, Qlik Sense and Qlik Cloud at the same way. You can find many good tutorials in the community, I would suggest this.

I hope this helps.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up ! 🙂

View solution in original post

1 Reply
Andrea_Bertazzo
Support
Support

Hi Tommsasper,

 

Thanks for the question. If I understand it correctly, you can get the result you need by using Set Analysis. An expression like this should work:

Avg({$<CustomerGroup = {RR}>} Kilo).

The {$<CustomerGroup = {RR}>} part is how you can define the set of data to consider for you formula.

If you are new to Set Analysis, I would encourage you to invest some time to get familiar with this extraordinary powerful feature that can be used in QlikView, Qlik Sense and Qlik Cloud at the same way. You can find many good tutorials in the community, I would suggest this.

I hope this helps.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up ! 🙂