Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Ucboy4
Regular Visitor

ESTABILISHING COUNT OF WORKDAYS FROM STAFF DAILY INPUT

Hi Everyone,

 

I am currently working on a dashboard to show average staff productivity for a given interval of time. To estabilish my datapoint for staff availability for given day (ie count of workdays) I referred to call interaction log date.

 

however, the challenge is that a staff may log multiple interactions for a day so my code end up returning count of interactions rather than count of workdays .

 

I will appreciate a solution to this

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@Ucboy4 

 

Difficult to say withour data-point here but you might do something like

 

If(DISTINCTCOUNT(DATE)>1,1,0)

 

NOTE: As you said there are multiple transaction in a day hence distinct count in a day will be greater than 1 if you have DateTime , if the granularity is at Day level then you can expect one with DISTINCTCOUNT anyways

/Another option is to trim datetime to day and then take DISTINCTCOUNT

 

This way you consider multiple count as 1 only

 

Regards,

Ritesh

 

View solution in original post

3 REPLIES 3
Ucboy4
Regular Visitor

Hi Ribisht,

 

This actually worked, I trimed the date.

 

thanks a million

gauthamboppana
Solution Specialist
Solution Specialist

@Ucboy4  - Use Distinct count and see if that works.

 

= DISTINCTCOUNT([Date])

 

Did I answer your question? Mark my post as a solution! If not, please feel free to ask me.

Also, I would ❤ Kudos if my solution helped.  It is a token of appreciation!

Thank you very much !

ribisht17
Super User
Super User

@Ucboy4 

 

Difficult to say withour data-point here but you might do something like

 

If(DISTINCTCOUNT(DATE)>1,1,0)

 

NOTE: As you said there are multiple transaction in a day hence distinct count in a day will be greater than 1 if you have DateTime , if the granularity is at Day level then you can expect one with DISTINCTCOUNT anyways

/Another option is to trim datetime to day and then take DISTINCTCOUNT

 

This way you consider multiple count as 1 only

 

Regards,

Ritesh

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.