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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Shared Axis on different data tables - line graph

I have 2 data tables which showed 2 oil wells with different production start date. I want to show on a line graph the 2 wells with the same day of production on the x-axis. However, my graph shows one table with the correct production but the other one is always a flat line. Any ideas on what I'm doing wrong? see tables below-

Data Table.PNG

 

 

1 ACCEPTED SOLUTION

@Anonymous solution attached.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

12 REPLIES 12
jtownsend21
Responsive Resident
Responsive Resident

My first suggestion is to append the two tables together in the query editor. I have a similar data set that I do this with. 

 

Alternatively if you don't wish to create a new table you can create a relationship between the two tables on "Days of Production" but leave it inactive. From there create a new measure: 

Measure = 
     CALCULATE(
          SUM(
               'Table 1'[Oil (Barrels Produced)],
               'Table 2'[Oil (Barrels Produced)]
          ),
          USERELATIONSHIP(
               'Table 1'[Days of Production],
               'Table 2'[Days of Production]
          )
     )

 

@Anonymous solution attached.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous you need to have date. dimension in your model and then link your both tables with date dimension and on x-axis use date from date dimension and value from these two tables, it will work as expected.

 

There are many blogs on how to create date/calendar dimension in your model using DAX or PowerQuery. Hope it is helpful. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Here's the correct view but in excel. I would prefer to do it in PBICorrect View but in excel.PNG

@Anonymous it should work, it is plotting correctly based on your data. if you want to show day number on x -axis, just add another column in your date dimension. if there is production on day 1, it will show up. I don't have visibility to your data so cannot comment why it is not showing for day #1



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Still doesn't work on my end. Wish I can send you my PBIX file.

@Anonymous you can send pbix by sharing thru onedrive or google drive.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Ahh - here you go 

<iframe src="https://onedrive.live.com/embed?cid=82EF034223338005&resid=82EF034223338005%21103&authkey=AD8UzJ-QMsAbBrA" width="98" height="120" frameborder="0" scrolling="no"></iframe>

@Anonymous so in my opinion it is working correctly, there is no oil produced in sheet 1 (2) for first 8 days, it is zero. Not sure what result you expect?

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Anonymous i looked at your table closely and now I know what you are looking for. stay tuned.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Anonymous you can add "production day table" as below and then set relationship with this new table with both tables using "day of production"

 

Production Day Table = GENERATESERIES(0,31, 1 )

 

use column form "production day table" on x - axis and value from both tables and that will do it.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks but it is not quite what I'm after using a calendar table. I want production on the same "Days of  Production" on the using Day 1 as the start date.

 

Shared Calendar view.PNG

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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