Dear All,
I got another ask to our community.
I am trying to figure out dax calculations to resolve below table:
I got positions for employees and gender. Second column shows total numer of male and female (which is also provided for each row). Third column shows total number of employees for only positions where number of males >=2 and number of females =>2. At this point I got problem. I cannot achieve 4th column which is sum of 3rd column for all grades which pass above conditions (Male>=2 and Female>=2). Using in dax formula function ALL cause that in return I am getting total of second column (regardless males and felames condition).
I would be much appreciated for your help.
BR,
Adrian
Solved! Go to Solution.
Hi @n00ne
You can try the following measure:
Total cnt = IF([cn filter]<>BLANK(),COUNTROWS(FILTER(ALLSELECTED('Table'),[cn filter]<>BLANK())))
[cn filter] and [cn all] are both measures.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @n00ne
You can try the following measure:
Total cnt = IF([cn filter]<>BLANK(),COUNTROWS(FILTER(ALLSELECTED('Table'),[cn filter]<>BLANK())))
[cn filter] and [cn all] are both measures.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@n00ne What should be Total cnt column be for those rows if not 43?
43 is corrent. The only problem is what calculation should I use to get it?
@Greg_Deckler any idea how to solve this, please?
Hi again,
Just wanted to support you with raw data.
ID | M/F | Position |
1 | F | |
2 | F | 11 |
3 | M | 11 |
4 | F | 12 |
5 | F | 12 |
6 | M | 13 |
7 | M | 13 |
8 | F | 14 |
9 | M | 14 |
10 | M | 14 |
11 | M | 14 |
12 | F | 14 |
13 | F | 14 |
14 | F | 14 |
15 | M | 15 |
16 | M | 15 |
17 | M | 15 |
18 | M | 15 |
19 | M | 15 |
20 | F | 15 |
21 | M | 15 |
22 | M | 15 |
23 | M | 16 |
24 | M | 16 |
25 | M | 16 |
26 | M | 16 |
27 | M | 16 |
28 | F | 16 |
29 | M | 16 |
30 | M | 16 |
31 | M | 16 |
32 | M | 16 |
33 | F | 16 |
34 | M | 16 |
35 | F | 16 |
36 | M | 16 |
37 | M | 16 |
38 | M | 16 |
39 | F | 16 |
40 | M | 16 |
41 | M | 16 |
42 | M | 16 |
43 | M | 16 |
44 | F | 16 |
45 | M | 16 |
46 | M | 16 |
47 | M | 16 |
48 | M | 16 |
49 | M | 16 |
50 | M | 16 |
51 | M | 16 |
52 | M | 17 |
53 | M | 17 |
54 | F | 17 |
55 | M | 17 |
56 | M | 17 |
57 | F | 17 |
58 | M | 17 |
59 | M | 18 |
60 | M | 18 |
61 | M | 18 |
62 | M | 18 |
63 | F | 19 |
64 | M | 19 |
65 | M | 20 |
User | Count |
---|---|
130 | |
53 | |
35 | |
31 | |
30 |
User | Count |
---|---|
160 | |
54 | |
38 | |
30 | |
28 |