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: 
MS90
Creator
Creator

Average count based on specific field

Hi 

I need Avg of time period for location to specific field please find below details.

 

Table A.                                           Table B

S.no Timeperiod.    Loc           S.No   ItemNo

1.            10              Us                       1.    878

2.            20                can                    2.   929

3.           30.               Mex                     3.    332

4.           40              uk                          4.         446

I have used aggr(avg({<loc={'us'}>}Timeperiod),ItemNo) it is not showing output and when I am applying avg(aggr(avg({<loc={'us'}>}Timeperiod),ItemNo)) it is showing result.

Labels (4)
3 Replies
henrikalmen
Specialist
Specialist

How do you want to present the result? If you just need a straight table with tow columns you could simply use Loc as dimension and avg(Timeperiod) as measure. If you add ItemNo as another dimension you will get the average per ItemNo and Loc.

MS90
Creator
Creator
Author

Hi,I need to show on bar chart where using two fields loc and item no I need to show average time period 

 

 

henrikalmen
Specialist
Specialist

Do you get what you want with this in a bar chart?

Dimension: =Loc & ': ' & ItemNo
Measure: =avg(Timeperiod)