Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am trying to create a Card that shows how many people we have off today.
Data is fairly simple;
Start date of leave and end date of leave (fyi, return to work would be next working day after end date).
The data is not linked to anything else in the Dashboard.
I had it set up and almost working with this;
With a relative date filter for in the last 1 day.
But realised it was missing anyone that had more than one day off as it was only looking at the start date.
For example;
I have one day off, start date and end date would both be 04/12/2019.
- Measure would be correct and count me off today based on start date (04/12/2019).
I have three days off, start date would be 04/12/2019 and end date 06/12/2019.
- The current measure would only count me off today (04/12/2019) but not the next two days as it is not looking at the end date (or the range between start and end date).
My first instinct was to go back to Excel and list all dates between the Start Date and End Date columns and count how many times todays date shows up.
But also feel that this would be too messy for what should be a simple Card and would like to keep the Excel data as un-manipulated as possible.
I am at a bit of a loss on what to do.
Thanks in advance.
EDIT:
@Anonymous
Output is to a Card;
Not sure about the sample data, sorry.
As posted above its just 2 columns with dates (Start Date and End Date).
Do I need to attach an excel doc with some of the raw data?
Solved! Go to Solution.
Hi @ScoRusTAFENSW ,
Use below measure to count of leave based on selection date,
Thank you @Anonymous,
It works perfectly!
If you have the time, could you please explain how it works?
I think I understand the filter less than and greater than section.
But a little unsure about the Selected_Date VAR details.
Thanks again.
Hi @ScoRusTAFENSW ,
Use below measure to count of leave based on selection date,
Thank you @Anonymous,
It works perfectly!
If you have the time, could you please explain how it works?
I think I understand the filter less than and greater than section.
But a little unsure about the Selected_Date VAR details.
Thanks again.
Hi @ScoRusTAFENSW ,
Selected_Date returns a date based on your filter selection, If you select only one day in filter it will return selected date or else return today. Based on selected_Date it will calculate the absent count.
Best Regards,
Mail2inba4
Hi @ScoRusTAFENSW ,
Please share the sample data and output.
Best Regards,
Mail2inba4
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |