Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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)