Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

overall avg against crosstab avg

Hi All,

Im working with a hospital data so I can't get great examples without re-writing it too much, but basically I want to be able to show a crosstab table that has Procedure Name and Surgeon Name as the main dimensions and then as the expressions I want the avg case minutes to show as the 1st expression (this already works) and as the 2nd expression i want to be able to show the Procedure specific avg case mins (when the 2nd dimension is choosen to look at it by surgeon)

So basically it would be like:

Procedure  Surgeon   [Avg Case Mins]  [Procedure Avg]

T&A          Doc1          25                             23.3                         

T&A          Doc2          22                             23.3

T&A          Doc3          23                             23.3

I want to be able to show that T&A as a procedure takes 23.3mins, then when you break it down to dimension 2(surgeon) you see the Surgeons avg against the whole procedures avg

I tried using something like Avg({1} [Case Minutes]), but it didnt return the right info..

I have avg([Case Minutes]) as my Expression 1, which will break dwon to surgeon level just fine

Thoughts?


Thanks,

Stan

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try avg({1} total <Procedure> [Case Minutes])

See attached qvw for a similar example.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
abeyphilip
Creator II
Creator II

Can you try this for 2nd expression:

aggr(avg({<Surgeon=>} Case Mins), Procedure)

Haven't tested though.

swuehl
MVP
MVP

Try

=avg(TOTAL<Procedure> [Case Minutes])

Gysbert_Wassenaar

Try avg({1} total <Procedure> [Case Minutes])

See attached qvw for a similar example.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you all for the tips!