Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.