Forum Discussion
Anonymous
4 years agoNot applicable
Distinct count with datediff between column date and selected date value
Hi Team, I am new to Power BI and is currently working on a calculation which I cannot figure out. I am trying to count distinct number of employees from a fact table using the following calcula...
Anonymous
4 years agoNot applicable
Thanks for the answer.
What we need is date difference between employee hire date and selected calendar date but excludes the weekend from the calculation between the 2 dates. Something like below and the calendar table is not connected to fact table.
employee_count_90days = calculate(distinctcount(employees[employee#]), FILTER(employees, employee_status = "Active" && DATEDIFF(employees[hire_date],selectedvalue(calendar[Date]),DAY) - (**weekends between the hire date column and slicer selected date ) > 90))
v-henryk-mstf
Community Support
4 years agoHi Anonymous ,
It is not yet clear, is it possible to provide test data and screenshots of the expected results?
Best Regards,
Henry