cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Super User

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

3 REPLIES 3
Regular Visitor

Hi Ribisht,

This actually worked, I trimed the date.

thanks a million

Solution Specialist

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

= DISTINCTCOUNT([Date])

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

Thank you very much !

Super User

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors