Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Regarding Pivot table row wise average

Hello Friends,

Your helps are always appreciated!

I have a pivot table in which I need a row wise average as like below,


id1518192021222324
MGR2MGR3MGR4MGR5MGR6MGR7MGR8MGR9Average
Leadership
A5561NA274.3
B34627464.6
C45457334.4
D46626444.6

Kindly share your ideas


Thanks,

Kiru

Labels (1)
6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Not applicable
Author

Thank you Gysbert!

gerhard_jakubec
Contributor III
Contributor III

Hi Kiru,

i am stuck on this topic for quite some time now.

My situation:

  • pivot table
  • 3 dimensions (time horizontal, others vertical)
  • 1 expression = count(distinct [businessKey])

Requirement:

  • expression total for vertical dimension totals
  • average of column values by row for horizontal (time) dimension total

unfortunately I have not found a solution yet... good luck

Clever_Anjos
Support
Support

Please check if this solve your needs

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use an expression with Dimensionality() (for row dimensions) and SecondaryDimensionality() (for column dimensions) like this:

If(Dimensionality() = 0,

  Count(Distinct businessKey),

  If(SecondaryDimensionality() = 0,

  Avg(Aggr(Count(Distinct businessKey), Dim1, Dim2, Dim3)),

  Count(Distinct businessKey)

  )

)

where Dim1, Dim2, and Dim3 are the three dimensions of the table. See attached for an example

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gerhard_jakubec
Contributor III
Contributor III

Thank you, will test your proposed solutions.

kind regards