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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
BI101
Regular Visitor

Overlaying two graphs

Hi,

 

I have a scenario where i have an order date and a quote date - the date includes both month and year.

I have count and total price associated with each.

I'm looking to compare data by month and filter by year. 

 

i believe the x axis can be the month and is a common denominator. I'd like to graph sales vs month and quotes vs month though.

is there a way to arrange my data and graph both sales and quotes data on one graph?

 

 

2 ACCEPTED SOLUTIONS

Piggy backing on this to give @BI101 a more usable context:

Set up 2 relationships between your Calendar table and your data table.  One relationship will need to be made inactive. 

 

These relationships should be between something like 'Calendar'[Date] and 'Yourdata'[Order Date] as well as 'Calendar'[Date] and 'Yourdata'[Quote Date].  Lets assume you make "Order Date" the active relationship

Next you'll have a measure like:

Order Count = COUNTROWS('Yourdata')
Quote Count = CALCULATE(
    [Order Count],
    USERELATIONSHIP('Calendar'[Date], 'Yourdata'[Quote Date])
)

View solution in original post

v-jianpeng-msft
Community Support
Community Support

Hi, @BI101 

Thanks @lbendlin and @RossEdwards , I have the following additions. According to your description, you can use a chart like Line chart or line and stacked column chart, as shown below:

vjianpengmsft_0-1709792155570.png

vjianpengmsft_1-1709792502878.png

Place your sales field on the Y-axis and your quotes field on the Second Y-axis. Through this type of chart, you can clearly see the comparison of sales or quotes in each month. The following is a case with the same problem as yours:

Solved: Overlaying Graphs - Microsoft Fabric Community

Solved: Overlaying Graphs or Tables - Microsoft Fabric Community

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

View solution in original post

3 REPLIES 3
v-jianpeng-msft
Community Support
Community Support

Hi, @BI101 

Thanks @lbendlin and @RossEdwards , I have the following additions. According to your description, you can use a chart like Line chart or line and stacked column chart, as shown below:

vjianpengmsft_0-1709792155570.png

vjianpengmsft_1-1709792502878.png

Place your sales field on the Y-axis and your quotes field on the Second Y-axis. Through this type of chart, you can clearly see the comparison of sales or quotes in each month. The following is a case with the same problem as yours:

Solved: Overlaying Graphs - Microsoft Fabric Community

Solved: Overlaying Graphs or Tables - Microsoft Fabric Community

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

lbendlin
Super User
Super User

Consider employing USERELATIONSHIP for this.

Piggy backing on this to give @BI101 a more usable context:

Set up 2 relationships between your Calendar table and your data table.  One relationship will need to be made inactive. 

 

These relationships should be between something like 'Calendar'[Date] and 'Yourdata'[Order Date] as well as 'Calendar'[Date] and 'Yourdata'[Quote Date].  Lets assume you make "Order Date" the active relationship

Next you'll have a measure like:

Order Count = COUNTROWS('Yourdata')
Quote Count = CALCULATE(
    [Order Count],
    USERELATIONSHIP('Calendar'[Date], 'Yourdata'[Quote Date])
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.