Forum Discussion
Checking Employee Count on specific date.
- 6 years ago
Hi Jensej ,
Just update your old measure, not write a new measure, add the group field in the below filter, refer to the previous formula in variable:
filter(allexcept(bi_employee,bi_employee(gender),bi_employee(group)),...)Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jensej ,
There seems to be no problem only from your formula. In dax, && = AND and || = OR are corrent so the logic has no problem.
Perhaps need more information about this for further discussion.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
It works now, it was a problem with the Datamodeling.
I can now choose a date in the Slicer and my measure shows me the Total Residents at that day.
Now to the next problem 😞
As showned in the Picture i want to Add a Pie Chart that shows me the Gender from the 46 Residents at that day.
If i put Geschlecht (Gender in German) on the Legend and the Measure Anzahl Bew (Total Residents) as Values i get 46 everyone. It already summed up. I want to see that it was 20 Females and 26 Males at that day. How can i solve this?
If i put the for example the Employee ID in Values instead of my new Measures it splits after Gender but all the Amount of Residents are showned and not the 46 at that specific date.
- v-yingjl6 years agoCommunity Support
Hi Jensej ,
You can modify your variable _empoyees like this:
var _employees = CALCULATE( COUNT('bi_employee'[id]), FILTER( ALLEXCEPT(bi_employee,bi_employee[Gender]), 'bi_employee'[Entry_Date] <= _date && ('bi_employee'[Resign_Date] = BLANK() || 'bi_employee'[Resign_Date] > _date) ) )Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- Jensej6 years agoHelper V
v-yingjl Thanks, your my hero!
Im now able to choose one Specific Date and all the Calculations are correct.
I have a second slicer on my Report where i should be able to filter on the different groups or combine some of them.
For example i should be able to select Gruppe A and Gruppe B and the numbers will change. After i made all the changes with the specific date it doesn't work anymore. Do i have to make some measure from the Gruppe field and use this instead of the Original in the slicer to make it work?
- v-yingjl6 years agoCommunity Support
Hi Jensej ,
Continue to add the Group field in the filter which is similar with the previous formula:
var _employees = CALCULATE( COUNT('bi_employee'[id]), FILTER( ALLEXCEPT(bi_employee,bi_employee[Gender],bi_employee[Group]), 'bi_employee'[Entry_Date] <= _date && ('bi_employee'[Resign_Date] = BLANK() || 'bi_employee'[Resign_Date] > _date) ) )Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.