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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
lmonincx
Creator II
Creator II

% calculation based on 2 dimensions

Hi,

I am try to establish in a straight table with two dimensions Naam and Hyp to get a % of the counter .

data:

Naam Hyp Counter

Linda Eerste 18

Isabel Eerste 22

Edward Tweede 50

-----------

so total of 90

The expression must first get a total on Hyp level like Eerste on 40 and then calculate on Naam level like Linda the % of Linda's Counter in regards to the total within the same dimension level.

Expected outcome should be 45 % ( 18 out of 40)

Any idea how to do this?

Regards,

Linda

1 Solution

Accepted Solutions
Not applicable

You should be able to create that Expression using the Aggr() function (Page 353 in Book II of the Reference Manual).

Sum(Counter) / aggr(nodistinct Sum(Counter), Hyp)


I've attached the sample.

View solution in original post

2 Replies
Not applicable

You should be able to create that Expression using the Aggr() function (Page 353 in Book II of the Reference Manual).

Sum(Counter) / aggr(nodistinct Sum(Counter), Hyp)


I've attached the sample.

lmonincx
Creator II
Creator II
Author

Many thanks that worked! Big Smile