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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
thomsontam
Frequent Visitor

Is it possible to shows data from two tables to a single Chart? (Using both Y axis)

Hi All,

 

I had the follow data table:

table1 sample:

StoreCustomersDate
A5001 June 2020
B3001 June 2020
C8001 June 2020
A5502 June 2020
B3102 June 2020
C9002 June 2020

 

Table 2 Sample:

StoreProductQualityDate
ACoffee4001 June 2020
ACake2001 June 2020
ATea1001 June 2020
ACoffee3802 June 2020
ACake2502 June 2020
ATea1702 June 2020
BCoffee2001 June 2020
BCake201 June 2020
BTea1001 June 2020
BCoffee2502 June 2020
BCake502 June 2020
BTea602 June 2020
CCoffee6001 June 2020
CCake3001 June 2020
CTea2001 June 2020
CCoffee5502 June 2020
CCake4002 June 2020
CTea2502 June 2020

 

We can create a report in Excel by merger those data together and put products on Primary Y asix and Total Customers on Seconary Y asix. However, I am unable to find option to do it in PowerBI.  Currently I create two charts overlay together to get the same result as Excel.  Is it possble to replicate it in a single chart under PowerBI?

 

Thanks for your help!

 

 

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @thomsontam ,

 

It is suggested to create a Dates table and a Stores table. Then create relationships among the tables.

 

 

Dates = 
CALENDAR (
    MIN ( MIN ( 'Table 1'[Date] ), MIN ( 'Table 2'[Date] ) ),
    MAX ( MAX ( 'Table 1'[Date] ), MAX ( 'Table 2'[Date] ) )
)
Stores =
DISTINCT (
    UNION ( DISTINCT ( 'Table 1'[Store] ), DISTINCT ( 'Table 2'[Store] ) )
)

 

 

relationship.PNG

chart.PNG

 

Or, you can use Merge to combine the two tables to one.

merge.gif

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

2 REPLIES 2
Icey
Community Support
Community Support

Hi @thomsontam ,

 

It is suggested to create a Dates table and a Stores table. Then create relationships among the tables.

 

 

Dates = 
CALENDAR (
    MIN ( MIN ( 'Table 1'[Date] ), MIN ( 'Table 2'[Date] ) ),
    MAX ( MAX ( 'Table 1'[Date] ), MAX ( 'Table 2'[Date] ) )
)
Stores =
DISTINCT (
    UNION ( DISTINCT ( 'Table 1'[Store] ), DISTINCT ( 'Table 2'[Store] ) )
)

 

 

relationship.PNG

chart.PNG

 

Or, you can use Merge to combine the two tables to one.

merge.gif

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

amitchandak
Super User
Super User

@thomsontam , Create a common dimension of store and Date and you can analyze data together

 

Store Dim = DISTINCT(UNION(ALL('Table 1'[Store ]),ALL('Table 2'[Store ])))

// You an use only one table

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors