cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bojangles35
Regular Visitor

Date Time Circular Dependency

bojangles35_0-1638223083020.png

I'm having trouble with A date table to plot two values on the same line graph with date as the x axis.  I've tried a date table and hour table as well but above is the simplest represenation.  My "New Well Forecast" table only has one value per date while the "Production" table has a value for every hour of every day.  When I plot this chart with the relationships above, it only shows the Date/Times that are in the "New Well Forecast Table" and shows no values from the production table.  

 

I've tried a number of different solutions.  The new well forecast table should really be merged with the production table but the production table is a direct import.  I can't do it in SQL either.  Can anyone help me out?  

 

Thanks

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @bojangles35 ,

 

The relationship of your model is wrong,please try what said before, then try to create a measure to calculate the two values you want

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I'm not sure what you mean but see below for more details.  Thanks.

amitchandak
Super User
Super User

@bojangles35 , In this case, your Date needs to be date-time table.

Then you can join it with production and datetime and with forecast  on Date (Many to Many) , but that should work fine.

If needed, you can separate date table too, which join with date from both tables. In case of Production you have create a date without timestamp to join

 

 

Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))

in Power Query
DateTime.Date([datetime])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Hi amitchandak,

 

Thanks for the help and sorry for the late reply.  I am linking both tables to the Date Table with Date/Time and have all hours of the day for the Date table and production table but only one hour for the Forecast table.  I wrote my question quickly so missed some things.  I need to filter everything by "Well".  This is the unique identifier in the "Well" Table but is in all three tables and the connection between all of them.  .  

 

bojangles35_0-1638459663526.png

The filtering seems to acutally be the issue.  I have a slicer for "Well" from the New Forecast Table.  When the relationship between the Well table and New Well Forecast table is both directions as in my original post, I only get the "Date/Time" that's in the New Well Forecast Table for the "Gas Actuals" from the production table.  It should have all hours of the day.  

bojangles35_1-1638460979946.png

If I have the relationship as single directional filter as below, the Date/Time aspect works but the "Well" Slicer doesn't do anything, all wells are always selected.  (You can see this in the 12/2 12:00 AM as the previous 5853 doesn't match below because there are two "Wells" even though the slicer has one).  

 

 

bojangles35_2-1638461130922.png

bojangles35_3-1638461225478.png

 

 

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors