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

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

Reply
Syndicate_Admin
Administrator
Administrator

Graph of lines with years

Hello, thank you all for helping me :), I am new to power BI and I do not know how to make a line graph with the history of years. I mean, I have a column that has a date, it starts on 01/01/2015 and the last row ends on 31/12/2018, in the same way I have another column with the temperature recorded every day. I need to create a graph of lines that in the x axis are the months, and in the y axis is the temperature, however I need to create 3 lines (one that indicates how the temperature was for each month of each year, to review the contrast of each year and its peaks, all within the same graph)

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

According to your description, you need to put the date field with a continuous date structure into the x-axis in the line chart visual, and the hierarchical structure only retains Month. Then go to analytics to add the required line, refer to the following:

vhenrykmstf_3-1631694550697.png

 

vhenrykmstf_1-1631694495371.pngvhenrykmstf_2-1631694521174.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

According to your description, you need to put the date field with a continuous date structure into the x-axis in the line chart visual, and the hierarchical structure only retains Month. Then go to analytics to add the required line, refer to the following:

vhenrykmstf_3-1631694550697.png

 

vhenrykmstf_1-1631694495371.pngvhenrykmstf_2-1631694521174.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

parry2k
Super User
Super User

@Syndicate_Admin the best way is to add a calendar table that you can easily do by following my blog post here Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...

 

and once you can calendar table, set relationship with transaction table, add a line visual,

 

- on row, put month name from calendar table

- on legend, put year from calendar table

- on values, add temperature and change the aggregation to maximum 

 

once above all is done, you will get what you are looking for

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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.

Helpful resources

Announcements
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