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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ethel
Creator III
Creator III

distribution of data in the table

Hello, could you please help me with a problem....It seems to be a simple thing but it is not working for me....

I have 2 types of year(periodtype): YTD and Rolling 12 month.

I have department(A,B,C), division(A1,A2, B1,B2,C1, C2), gender(male, female), ethnicity(white, black, asian) and head count columns in the table. 

When I'm applying my set analysis function to headcount, I'm not getting the right total in the table. What am I doing wrong?(I understand that I'm doing avg and aggr, but is there another way to do it?)

My formula is 

avg(aggr(sum({< $(vPeriodType)>}HeadCount),[PeriodKey],Gender,Ethnicity, department, division))


Thanks a lot in advance!

Labels (4)
4 Replies
sidhiq91
Specialist II
Specialist II

@Ethel  what is your requirement? could you please provide some sample data for us to work on it?

Ethel
Creator III
Creator III
Author

I have to create a table like this. And in theory it's very simple. But because of my conditions on the type of the year my numbers don't match. So my question is if there is a completely different way to calculate headcount? Or should I put somewhere more avg/aggr?   Or do I have to deal with rounding and my totals won't be correct? 

Thanks a lot in advance!

Department Division Gender Ethnicity Head Count
A A1 f white 12
A A1 m white 13
A A2 m white 4
A A3 f black 6
A A3 m Asian 8
B B1 f white 9
B B2 f white 1
C C1 f white 3
C C1 m white 6
C C2 m white 9
        71
saniez
Contributor
Contributor

To calculate the probability, use the probability tables provided in ... because the smaller sample size means that the data does not fit normal curve as ...
Ethel
Creator III
Creator III
Author

I'm sorry, I probably didn't formulate my question correctly. All I need is to create a table from my example. I don't need to calculate probabilities on anything...My problem is that when I'm using this formula

avg(aggr(sum({< $(vPeriodType)>}HeadCount),[PeriodKey],Gender,Ethnicity, department, division))

My totals don't match, aggregation is not calculated correctly. My question is what can I do about it?