Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can somebody help? I have two tables:
Table1:
GroupA, ID
Employees-Male, 1
Employees-Female, 2
Managers, 3
T_Employees, 4
T_Managers, 5
Overall, 6
Table2:
GroupB, ID, Count
Employees-Male, 1, 150
Employees-Female, 2, 200
Managers, 3, 25
What I would like to get an expression on is if I select fields in Table1:
Employees-Male - Count is 150
Employees-Female - Count is 200
Managers - Count is 25
T_Employees - Count is 350 (sum of male & female)
T_Managers - Count is 25 (Managers)
Overall - Count is 375 (all)
I'm thinking if statements in Set Analysis but not sure how to do it.
I already have this expression to begin with which outputs the count as field in Table1 is selected which solves the first three.
sum({<Table2= P(Table1)>} Count)
Since Table2 is just a subset of Table1, the last three (T_Employees, T_Managers, and Overall) is zero. I probably need to add conditions (IF statements) to satisfy conditions.
Any help would be appreciated.
it worked. just had to delete the $ sign.
If(GroupA= 'T_Employees', Sum({<GroupB= {'Employees-Female', 'Employees-Male'}>} Count)), If(GroupA='T_Managers', Sum({<GroupB= {'Managers'}>} Count)), Sum(Count)))