Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Divide column values by a variable

Hi All,

Is it possible to add a calculated column to a table object in Qlik Sense? I've been spinning my wheels for a bit and could use some help. Here's my scenario and attempted solution

Scenario: Say I have a dataset with a couple columns 'Process' & 'Count', and I want to display the count of each process as a percentage of the total count in a column as shown below;  

ProcessCountPercent
A533.33%
B16.67%
C320.00%
D426.67%
E213.33%


Attempted Solution: Declare the total count as a variable(SumCount), then create a measure with expression (Count/$(SumCount))*100. This doesn't work, it gives a column with all 100 values.

Attached is a sample qvf.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Count/Sum(TOTAL Count)


Capture.PNG

View solution in original post

3 Replies
oknotsen
Master III
Master III

No need for that variable.

Use sum(count)/sum(TOTAL count)

May you live in interesting times!
sunny_talwar

Try this:

Count/Sum(TOTAL Count)


Capture.PNG

Anonymous
Not applicable
Author

Fantastic! Thanks Sunny