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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ryan87
Regular Visitor

Issue plotting 2 MTD values on same visual

Hi,

 

I am trying to create a graph showing sales MTD and order entry for the current month and I am able to create the 2 line graph visuals seperately and they work (as below in table format) however when I try to show both values on one graph, one of the values turns into a flat line showing the maximum value from the data (screenshot - both together). Do you have any ideas on why this is happening?

 

I have used the following formula to calaculate the MTD totals

 

SALES MTD = TOTALMTD(SUM(SOPInvoiceCredit[Sales]), SOPInvoiceCredit[DocumentDate])

 

Thanks

 

 

Both togetherBoth togetherOrder EntryOrder EntrySalesSales

2 REPLIES 2
MFelix
Super User
Super User

Hi @ryan87,

 

When you use a measure this is calculated based on context, when you add to this the time inteligence part of the measures the way the model is setup is crucial for you to have the right results.

 

As I can see from your data you have 2 date columns (one for each table) and only using one of them in the visual if you have the information linked to each other you will have issues with non-consecutives dates on your tables.

 

To solve this you need to create a calendar table and then make a relationship between this table and the other two then redo your measures to something like this

SALES MTD = TOTALMTD(SUM(SOPInvoiceCredit[Sales]), CalendarTable[Date])

 

To create the calendar table follow this link or just google Power BI Calendar table.

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks @MFelix, we have also tried this with the same result so we have decided to start again with the date key before adding the SQL tables and see how we get on.

 

Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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