Linking Time Table with Dates in PowerBi

Hello Everyone,

I’m not sure if this is more of a DAX question for a Data modeling question. I am trying to create a report that can show how many samples were scanned during a specific time. For example between the hours of 8:00 AM to 10:00 AM the number maybe 100.

I am having trouble figuring out how to link a time table I have created with my date, and firstscans table. There may be a better way to do what I am trying to do but any help would be appreciated.

I have attached an example file of what I have so far. Example File Time.pbix (196.4 KB)

Hi @matthew.wright , we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.

  • When posting a topic with formula make sure that it is correctly formatted to preformatted text </>.
    image

  • Use the proper category that best describes your topic

  • Provide as much contextn to a question as possible.

  • Include the images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline https://forum.enterprisedna.co/t/how-to-use-the-enterprise-dna-support-forum/3951. Not adhering to it may sometimes cause delay in getting an answer.

Please also check the How To Mask Sensitive Data thread for some tips on how to mask your pbix file.

We have also have threads with some recommendations from other Power BI users which could help. Below are the links where you can view them. Hope this helps.

Hello @matthew.wright,

Thank You for posting your query onto the Forum.

In order to create/establish a relationship with the “Time” table. You just need to split the “Date and Time” into two separate columns i.e. one column for Date and one column for Time. Below is the screenshot provided for the reference -

And than create a relationship with the “Time” table based onto the fields “Time” from Time table and “created_time UTC” from FirstScans table. Below is the screenshot provided for the reference -

And than you’ll be able to analyse the numbers on hourly basis. Below is the screenshot of the final results provided for the reference -

Final Results

I’m also attaching the working of the PBIX file for the reference.

Hoping you find this useful and meets your requirements that you’ve been looking for. :slightly_smiling_face:

Thanks and Warm Regards,
Harsh

First Scans Data - Harsh.xlsx (23.4 KB)

Example File Time - Harsh.pbix (182.3 KB)

1 Like

@Harsh,

Thank you so much for your help. This worked great accept for some reason my file is not counting the same way.

When I sort the same I seem to have blanks and I can’t figure out why. Any thoughts?

image

I have attached sample files.Updated Example.pbix (169.5 KB) Users2.csv (473 Bytes) FirstScan_2.csv (39.9 KB)

Does anyone have any thoughts on this? I have been trying to resolve why this isn’t working but have had no success yet.

Hello Everyone. Finally figured it out. I need to exclude seconds from the time. Thanks for all the help!