Forum Discussion
Checking Employee Count on specific date.
Hello There!
So im pretty new to Power BI.
Our company has some Groups with assisted living. (5 floors/groups)
I have made a report where i can see Total amount of residents,gender, avg age and where i can filter thruu the groups.
Everything works perfect until my boss asked me to go back in time and see how many residents we had at a specific date.
If i add a date slicer my Values isnt correct.
My goal is to have a single Date field in the report where my boss can add i date and the report would respond on that input.
Here is how the report looks like:
In the modeling i also have an Active Link from date of Entry and an inactive Link from date of Exit.
Can someone help me?
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.
12 Replies
- amitchandakSuper User
Jensej , Can you share sample data and sample output in a table format?
check if that can help : https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
- JensejHelper V
Hi amitchandak
Not really what i was looking for. I wanted like a Date slicer with only one input field on the report.
And if i put for example 1.1.2020 i want to see how many People was living on that floor at the moment.
It has to calculate like this:
Entry Date <= 1.1.2020
Exit Date > 1.1.2020 or Empty
Now i solved it with two page filters one for Entry Date and one for Exit Date but that could be to complicated for the Enduser that's why i wanted the Field directly in Report
- v-yingjlCommunity Support
Hi Jensej ,
Try like this measure and put it in a card visual:
Measure = VAR _date = SELECTEDVALUE ( 'Table'[Date] ) VAR _people = CALCULATE ( SUM ( 'Table'[count] ), FILTER ( ALL ( 'Table' ), 'Table'[Date] <= _date ) ) RETURN IF ( _date = BLANK (), "Please select a date in the slicer", "The number of people as of the selcected date is: " & _people )Attached a sample file that hopes to help you: Checking Employee Count on specific date.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.