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
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])

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
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.