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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
okiedokie2017
Helper I
Helper I

# of assessments running a day based on Start Time and Stop Time

Hello, 

 

I want to look at how many assessments running per day.

 

In the spreadsheet, there are "StartTime" and "StopTime" columns. These show the date and the time an assessment starts running and stops running. An assessment can either starts and stops in one day, or sometimes it can go on for several days or up to several weeks. 

 

So the task is a bit tricky as Im not looking at number of unique assessments per days, Im jsut purely looking at how many assessments per day in a specific month. 

 

 

Is there a way I can solve this? 

Many thanks 

 

 

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

 

Share a dataset and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Example: 

 

 

Start Time:                                StopTime                              Expected Result

20 October 2017 3 am             20 October 2017   5am         1 day

10 September 2017  6 am       12 September 2017  7pm      2 days 

18 October 2017 3pm              2 November 2017 11pm       15 days 

1 November 2017                    "Blank"                                    N/A

 

 

If an assessment has a "blank" stoptime, that means it is still running. I would like to create a column showing me how may days each assessment ran. 

 

But my main goal is actually to create a graph showing the exact number of assessment running per day in a month. If an assessment runs for 18 days, it will be counted for all18 days, etc. 

 

Capture.PNG

 

 

Hi,

 

For the second row, the answer should be 3 days - am i correct?  Also, what is the purpose of the time stap in each cell?  Does that time stamp play an role in determinig the numer of days?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

 

3 days is correct. My apologies. 

 

Let just ignore the timestamp for now, since it wasnt what I was looking for. I believe the date is good enough to achieve what I was hoping to. 

 

Best, 

Hi @okiedokie2017,

 

You may download my solution from here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello @Ashish_Mathur,

 

Thank you for sending the file. Much appreciated. 

 

I was trying to recreate the same thing, however, in "Edit Query", when I was trying to add the Custom Column with the formula: 

 

if [Stop Time]=null then DateTime.Date(DateTime.LocalNow()) else [Stop Time]

 

It doesnt seem to work, especially when I replaced "null" with "Blank()". As my datasets have blanks in there. any thoughts why this happened? 

 

Capture.PNG

 

 Many thanks! 

You are welcome.  What happens when you replace null with ""


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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