Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
agastya
Creator
Creator

How to get average of rows value of straight table into a text object

How to get average of rows value of straight table into a text object

 

Below expression

 

(Count({distinct key})-Count({distinct dwg}))/(Count({distinct dwg})-count(Aggr (if(count(distinct key)=1,1),dwg,ppnumbrr)))

@sunny_talwar 

1 Solution

Accepted Solutions
agastya
Creator
Creator
Author

@sunny_talwar used the below expression no use 

In straight table grand total showing "1.80" while used the same expression getting wrong output "1.63"

=Avg(aggr((count({<DWG-={' '}>}distinct DWG)-count({<DWG=-{' '}>}distinct DWG)) /(count({<DWG-={' '}>}DISTINCT DWG)-count(aggr(if(count({<DWG-={' '}>}DISTINCT KEY)=1,1),DWG,NEW_PPN))),NEW_PPN,DWG

 

 

View solution in original post

3 Replies
sunny_talwar

Something like this

Avg(Aggr(

(Count({distinct key})-Count({distinct dwg}))/(Count({distinct dwg})-count(Aggr (if(count(distinct key)=1,1),dwg,ppnumbrr)))

, Dimension/s))

Replace Dimension/s from the last row with the dimensions you have in your straight table 

agastya
Creator
Creator
Author

@sunny_talwar used the below expression no use 

In straight table grand total showing "1.80" while used the same expression getting wrong output "1.63"

=Avg(aggr((count({<DWG-={' '}>}distinct DWG)-count({<DWG=-{' '}>}distinct DWG)) /(count({<DWG-={' '}>}DISTINCT DWG)-count(aggr(if(count({<DWG-={' '}>}DISTINCT KEY)=1,1),DWG,NEW_PPN))),NEW_PPN,DWG

 

 

sunny_talwar

Would you be able to share a sample where we can see this?