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.
Hello,
I have below employee sickness data.
I created a date slicer based on From date to calculate sickness days and reporting days from date slicer
In the above example, I can get correct sickness days however I don't get the correct reporting period selected on the date slicer.
How can I create a measure to get the date selected in the date slicer?
Regards,
Parag Chapre
Solved! Go to Solution.
Hi @Anonymous ,
The information you have provided is not making the problem clear to me ,
If you want to find the duration date, you could use DATEDIFF() :
reporting days 1 =
CALCULATE (
DATEDIFF ( MIN ( [From date] ), MAX ( [From date] ), DAY ) + 1,
ALLEXCEPT ( 'employee sickness', 'employee sickness'[Employee] )
)
if you want to find the count of sickdays that are not empty, you can use COUNT()
reporting days= COUNT([Sick days])
The final output is shown below:
If this is still not what you want,please provide me with more details about your table and
your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
here is my solution for the reporting days:
Reporting days = DATEDIFF(MIN('Date'[From date]), MAX('Date'[From date]), DAY) + 1
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Hi @Anonymous ,
The information you have provided is not making the problem clear to me ,
If you want to find the duration date, you could use DATEDIFF() :
reporting days 1 =
CALCULATE (
DATEDIFF ( MIN ( [From date] ), MAX ( [From date] ), DAY ) + 1,
ALLEXCEPT ( 'employee sickness', 'employee sickness'[Employee] )
)
if you want to find the count of sickdays that are not empty, you can use COUNT()
reporting days= COUNT([Sick days])
The final output is shown below:
If this is still not what you want,please provide me with more details about your table and
your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , try like
countrows(filter(Table, not(isblank(Table[Sick Days]))))
I tried now but It's not working.
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |