Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
I'm trying to find the number of days an employee has worked. I'm doing this by looking at our appointments and seeing which days an employee has had an appointment. I'm trying to count the number of unique dates up until today.
Does anyone know how to achieve this?
Solved! Go to Solution.
Hey @Sohan ,
then you just have to filter the date to be smaller or equal than today:
Days Worked until today =
CALCULATE(
COUNTROWS(
VALUES( 'sample'[Date appointment] )
),
'sample'[Date appointment] <= TODAY()
)
The results changes accordingly:
Hey @Sohan ,
you can do a COUNTROWS of VALUES.
If you give some example data, I could give you a solution.
Hi @selimovd, thanks for your reply. Here is some sample data. Let me know if you have questions about it.
Hey @Sohan ,
the following measure should do it:
Days Worked =
CALCULATE(
COUNTROWS(
VALUES( 'sample'[Date appointment] )
)
)
The result could then look like that:
Hi @selimovd, thanks for your reply! I was able to achieve this, however I don't want future dates to be counted. I want the dates up until today to be counted.
Hey @Sohan ,
then you just have to filter the date to be smaller or equal than today:
Days Worked until today =
CALCULATE(
COUNTROWS(
VALUES( 'sample'[Date appointment] )
),
'sample'[Date appointment] <= TODAY()
)
The results changes accordingly:
Thank you so much!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
88 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |