Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Margaret
Creator II
Creator II

Pivot Table - arranging two subsets of expressions

Good evening (at least it is here),

I have a pivot table (see attached) with two columns showing names of physicians and their medical specialty (e.g. general surgery). And then a column of much more densely packed rows summarizing their activity for a period of time (how many admissions, how many Emergency Department visits, how many UrgentCare visits).

I want to add another densely packed chunk of rows to the right of that showing the count of those activities for each physician's specialty. So that a viewer can compare one physician's activity with that physician's peers.

I'm having trouble with both the calculation and the displaying of it.

See qvw attached.

Thank you!!

1 Solution

Accepted Solutions
jonathandienst

The specialty counts will look like:

=count(TOTAL <Specialty> CountAdmitting)

But I think what you are asking for is to have two columns of expressions. What you will need to do is add a dimension (lets call it Head1) that will have values 'Physician' and 'Specialty'. You could use an inline load like:

Head1:

LOAD * Inline

[

     Head1

     Physician

     Specialty

];

Add the dimension to the pivot and drag this dimension  to the top of the pivot, and then edit your expressions like this:

=If(Head1 = 'Physician',  count(CountAdmitting),

      count(TOTAL <Specialty> CountAdmitting))

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

View solution in original post

2 Replies
jonathandienst

The specialty counts will look like:

=count(TOTAL <Specialty> CountAdmitting)

But I think what you are asking for is to have two columns of expressions. What you will need to do is add a dimension (lets call it Head1) that will have values 'Physician' and 'Specialty'. You could use an inline load like:

Head1:

LOAD * Inline

[

     Head1

     Physician

     Specialty

];

Add the dimension to the pivot and drag this dimension  to the top of the pivot, and then edit your expressions like this:

=If(Head1 = 'Physician',  count(CountAdmitting),

      count(TOTAL <Specialty> CountAdmitting))

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

View solution in original post

Margaret
Creator II
Creator II

I got that to work. Thank you so much!