Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Basic question about dimension and total across aggregation

I have a simple table chart that groups a count by category such as:

Category A                      10

Category B                       15

Category C                       12

Category is the dimension as say count(people) is the expression.....

I want a column that has the percent of total so that it looks like:

Category A                      10          27.03             

Ctegory B                       15            40.54

Category C                       12          32.43

How would the expression look so that you could get the total across the dimensions so you can divide by it? Thanks.

4 Replies
Not applicable
Author

count(Total people)

so

count(people) / count(Total people)

Not applicable
Author

that gets me closer but  I forgot to mention that I also have another dimension 'Year'.... so the total worked but it seems to be not using the Year dimension... It is showing something like this:

                                       Year 1          Year 2

Category A                      13.4            5.5

Ctegory B                       23.5          13.45

Category C                       12.2          32.43

Where everything adds up to 100% but I want each year to add up to 100%... How can i do this?

Not applicable
Author

aggr(count(Total people),Year)

Not applicable
Author

I am probably not explaining this well.... Here is the actual chart... As you can see for example the Self Pay shows 4.06%... It should be the count which is 106982 divided by the total count for that year which is 866962. So it should be 12.34%...

My expression for the count is: =Count([Fact Visit Counter])

Any help is greatly appreciated.

question.JPG