Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello ,
I'm trying to use Dax expressions to count how many people are eligible to a bonus or not .
My Data set is the following
I have a fact table (Data) wich is related with a matching table (Correspondance Nom) , wich is related with an other table (Tech) allowing me to display only the people I need ( may be adding a column to my fact table , stating " Active" or "not Active would be a better option ? )
Here are results I don't understand when I try simple dax formulas :
- Measure = count ( tech [ Technician] ) , => not affected by my bonus filter ( Yes / NO , from Data )
I tried this one first , thinking that I will count only filtered active people ..
- Measure = count ( Data [ Technician] ) , => This one is affected by my filter and works properly , but tbh I expected that it count all technicians, even those who aren't in the Tech table
- Measure = Calculate (count ( Data [ Technician] ) , All (Data [ Bonus ] ) ) => Keep being filtered by the Bonus filter even if I use "ALL" statement ...
I reached my goal by simply doing
Mesure = count ( Data [ Technician] ) / count ( tech [ Technician]
but I don't like when I don't understand ..
Any help much appreciated !
TIA 😊
Hi @Anonymous
count ( tech [ Technician] )
Tech will not be filtered by Data since you don't have filter propogation going from Data to Correspondence. If you make the filter relationship between Data and Correspondence bi-directional, you should be able to filter Tech based on Data
count ( Data [ Technician] )
This measure doesn't take into account the relationship to Tech, unless you put a filter on Tech
Calculate (count ( Data [ Technician] ) , All (Data [ Bonus ] ) )
I can't reproduce this issue off hand.
There may be something else in your model or in the way you are implementing the bonus filter that is causing issues.
Hope this helps
David
User | Count |
---|---|
53 | |
35 | |
20 | |
15 | |
14 |
User | Count |
---|---|
94 | |
76 | |
36 | |
22 | |
18 |