Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Adding an avg row to straight table

Hi all,

i need some help adding an average row to a straight table. i have 3 teams in my data with  a 'Team Avg' row for each team. what i want is to add a rw to the bottom of my straight table showing the average of the 3 team avg's.

i have added a dummy value to my dimension called 'Total Avg' and now i am trying to find a way of averaging the 3 team avg's and putting that figure against the dummy figure created. if that makes sense!

what i want to achieve is something like the following.

Capture.JPG

i have attached an example.

many thanks

1 Solution

Accepted Solutions
sunny_talwar

15 Replies
ogster1974
Partner - Master II
Partner - Master II

I think you will struggle in a straight table unless you prepare the data during load and display it but not very dynamic.

The simplest way I can think of is to have either a seperate table below or KPIs with your Average/Averages calculated and align the objects accordingly.

Regards

Andy

sunny_talwar

Like this

Capture.PNG

ogster1974
Partner - Master II
Partner - Master II

Think hes looking for a solution in Sense.

sunny_talwar

May be, but the sample attached was a qvw

sunny_talwar

Also, I think this might work in Sense also

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

sorry guys, it is QV i created in the wrong place!!

thanks sunny, that does work in the sample i provided but struggling to get it working in my actual data.

Capture.JPG

i work out that the average should be 11+13+14+/3=12.66

can you see why this is?

sunny_talwar

What is the exact expression you are using?

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

=If(Dimensionality() = 0, Avg(Aggr(Avg(Aggr(MaxString(Thursday), Merged_Operative_Region_Name, RegionalManagerName)), Merged_Operative_Region_Name)),maxstring({<type={'RegionPerShift'}>}Thursday))

the data itself is in a single table but has the 'type' against each row. so on this occasion i only want to use the RegionPerShift type and ignore all other rows.

if that helps

sunny_talwar

How about this:

=If(Dimensionality() = 0, Avg({<type={'RegionPerShift'}>}Aggr(Avg({<type={'RegionPerShift'}>}Aggr(MaxString({<type={'RegionPerShift'}>}Thursday), Merged_Operative_Region_Name, RegionalManagerName)), Merged_Operative_Region_Name)), MaxString({<type={'RegionPerShift'}>}Thursday))