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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
kdmarkee
Specialist
Specialist

Working with percentage columns in QlikView

I'm sure this can be done but I haven't found the magic code yet upon my experimentation.  I have an issue where based on my data model's complexity, I get odd results when counting distinct for a column and then wanting to have a "% of" on that column as well.

Here is the underlying raw data:

rawdata.PNG

this is what is true:

true.PNG

 

 

This is what Qlik does, which in turn can make my % of bslips column wrong and the column total > 100%:

false.PNG

 

 

Here is what I think I need to overcome this...how do I build the blue column so I can use the column names from my expressions in my % bslips expression :

build total col.PNG

 

Thanks!

Labels (1)
1 Solution

Accepted Solutions
kdmarkee
Specialist
Specialist
Author

The count of alias will not work because that is not the most granular level of data in my data model.  I did some more experimentation and think I have what I need.  I used this get the blue column (bslip total):  sum(total aggr(count(distinct [bslip]), [alias])).  Now that I have bslip total and bslip count, I can use those column names in an expression to get me the correct row percentages (and correct column percentage total).

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Qlik Should give you correct result, if you have used proper expressions.

Anyways to get the blue field you can use below expression.

Count(Total alias)

 

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
kdmarkee
Specialist
Specialist
Author

The count of alias will not work because that is not the most granular level of data in my data model.  I did some more experimentation and think I have what I need.  I used this get the blue column (bslip total):  sum(total aggr(count(distinct [bslip]), [alias])).  Now that I have bslip total and bslip count, I can use those column names in an expression to get me the correct row percentages (and correct column percentage total).