Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
WE ARE LISTENING! New Navigation for Qlik Community, Sept. 26: TELL ME MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mattphillip
Creator
Creator

Row total percentages in a user defined custom table

Hope someone might be able to assist with this. We're looking to include some sort of custom report table within our new QlikSense apps (where users can select the visible dimensions and can specify the measure to be used.). The issue we're stuck with is that we want to offer the ability to calculate percentages based on the final field/row total e.g. if a table was displaying data for Divisions and Gender, we'd like to be able to provide percentages totalling 100% for each division. If a user was to then decide they'd like to change columns to Programme and Age Bracket, we'd still like the table to be able to calculate the proportions properly.

In our old Qlikview dashboards, we had a workaround where the user was presented with a pop up list box containing a field list so they could select their desired denominator. This was then fed into a variable which was then called in the following expression:

=count(FTE)/count(total<[$(vPercentageby)]>[FTE])

If possible, we'd like our QlikSense app to automatically pick up the appropriate field as a denominator. Does anyone have any ideas on how to accomplish this?

Any help is most appreciated.

Matt

Labels (7)
4 Replies
vinieme12
Champion III
Champion III

use GetObjectionDimension()

 

=count(FTE)/count(total<$(=GetObjectionDimension(1))>[FTE])

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
mattphillip
Creator
Creator
Author

Thanks for the suggestion but unfortunately it didn't work.
I've attached a screenshot.
vinieme12
Champion III
Champion III

I made a typo there it's 

GetObjectDimension() not 

=count(FTE)/count(total<$(=GetObjectDimension())>[FTE])

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
mattphillip
Creator
Creator
Author

Thanks for the reply. It works to a degree but I've noticed a problem. You code specifies the first dimension in the table. I'm trying to use conditional show with a filter pane. As such all the fields are 'in' the table already, just not showing until selected. As such, the expression only works with the first field in the table selected (in this case, Division). Is there a way to pick up the final field selected by the user? E.g. with a variable to count how many fields are selected? So for example, if a user selects School, Division and Gender, it would pick up gender as the final value for use as the denominator in the expression.
Any help is most appreciated.
Matt