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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SalimTRABELSI
Frequent Visitor

Making 2 y-axis with same parameter

Hello dear community,

I had 2 tables named impact I made one for 2019 and 2020 with the same attributes

 

SalimTRABELSI_1-1666281538291.png SalimTRABELSI_2-1666281616121.png

                               impact 2020                                                                         Impact 2019

I made a graph to compare the number of impacts in different years each month by counting id of the 2 tables in y-axis as shown below

 SalimTRABELSI_1-1666269893292.png SalimTRABELSI_2-1666270359099.png

I decided after that to merge the two tables into one named impact but I couldn't make the comparison based on year same as in the previous visualization I tried to filter or make a measure but I didn't know how 

Is there any solution to do that??

Thank you in advance

 

3 REPLIES 3
speedramps
Super User
Super User

Try somthing this

 

TotalSales = SUM(FactTable[Value])

 

Sales2019 = CALCULATE(TotalSales, 'Calendar'[Year] = 2019)

 

Sales2020 = CALCULATE(TotalSales, 'Calendar'[Year] = 2020)

 

Then drawa  link graph of Sales2019 and Sales2020 by month

speedramps
Super User
Super User

Do the  Impact 2019 and Impact 2020 only have the month name o0r number and not a date?

They need a date. You can't do date intelligance with just the month name or number.

Use Power Query to add date column eg the first or last date of each month for 2019 and 2020.

The relate the date to the calendar file.

You cam then slice, dice, subtotal and graph by year, month, quarter etc


Do these free Power BI Calenadr training modules

https://www.youtube.com/playlist?list=PL7GQQXV5Z8eczWqKFMDVoHMjTcpH3tgZm&cbrd=1

 

Otherise ....  we want to help you but your description is too vaugue. Please write it again clearly.

Provide example input data as table text (not a screen print) so we can import the data to build a solution for you.
Also provide the example desired output, with a clear description of the process flow.

Remember not to share private data ... we don't want you to get into trouble. 😧

Hi @speedramps 

First I want to thank you for your reply,

For the date yes I made a calendar I named it date also in impact 2019 and 2020 they had a date attribute

here's a sample of my table impact (impact 2019 and 2020 have the same structure so I merged them into one single impact table) 

SalimTRABELSI_0-1666280797596.png

And here's the calendar also I set up the relation between the 2 tables

SalimTRABELSI_1-1666281058408.png SalimTRABELSI_0-1666282005420.png

 

What I wanted to do is make a comparison of impacts in two years by month same as the visualization below

SalimTRABELSI_2-1666281250755.png

Note: this graph I made it when I had two tables (impact 2019 and impact 2020) but now I merge these tables into one table named impact and couldn't make the same graph above

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.