Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot Table calculations


I have a pivot table and it has a category of "Functional System".  For each Functional System (a type of highway) it gives me the total number fatalities for a 30 year period.  When I expand the Functional System, it then breaks out the the number of fatalities by year.  I am actually looking to have it show the percentage of fatalities of the total as opposed to the total number.  I have tried Set Analysis, but this does not seem to work.  I want it to show the percentage when the fields are collapsed or expanded.  Currently I have the expression as: Sum([Number Of Fatalities]) .

11 Replies
mov
Champion III
Champion III

Depending on what is the base of the %, it could be

Sum([Number Of Fatalities])/Sum(total [Number Of Fatalities])

or

Sum([Number Of Fatalities])/Sum(total<feield1, field2,...> [Number Of Fatalities])

Not applicable
Author

Thanks Michael.  I think this is the solution, but I need to know how "total" works.

Not applicable
Author

P.S.  It did work.  Although I am not completely sure how.

Not applicable
Author

I take that back.  When I did it, it used the total number of fatalities for all systems for all years,  When I expand it out to the years for each functional system, I need it to do the percentage for the functional system only.

mov
Champion III
Champion III

See attached with four versions of % calculations.  Choose what you need, or create your own by modifying/combining...

Not applicable
Author

Michael,

When people have sent me attachments, they do not appear in the view I have of the discussion.  I found a different view by accident once where I could get to the attachements.  Any idea how I get there so I can view your attachment?  Thanks.

mov
Champion III
Champion III

My bad - I didn't attach anything...

Not applicable
Author

Whew!  I feel much better now!  Thanks!

Not applicable
Author


Any way to send it as a doc instead of a QVW?  I only have the personal edition of Qlikview and have a limited number of files I can open as a QVW.