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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Analitika
Post Prodigy
Post Prodigy

Lines in visual in Power BI

Hi,

 

I would like to ask how to make a visual where lines number be equal selected years number for example, I select 2021, 2022 then two lines appear in visual. Lines is described by measure. So how I could adapt my measure?

Here is a visual:

Analitika_0-1665477080695.png

Measure looks like this:

 

1 ACCEPTED SOLUTION
jcalheir
Solution Supplier
Solution Supplier

Hi,

 

First make sure you have a date table. If you dont know what this is, star by reading this article and do some reserach about this, so that you understand the concept.

 

https://kohera.be/power-bi/how-to-create-a-date-table-in-power-bi-in-2-simple-steps/

 

 

Then you can create something like this

 

jcalheir_1-1665482157765.png

 

 

Create a line chart and add to X-axis the Month, the facts to the Y-axis and add to the Legend the Year (This way you dont agregate you yearly values).

 

Then create a slicer for the year, and this way you can chose the years you want to display in the line chart

 

Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

View solution in original post

1 REPLY 1
jcalheir
Solution Supplier
Solution Supplier

Hi,

 

First make sure you have a date table. If you dont know what this is, star by reading this article and do some reserach about this, so that you understand the concept.

 

https://kohera.be/power-bi/how-to-create-a-date-table-in-power-bi-in-2-simple-steps/

 

 

Then you can create something like this

 

jcalheir_1-1665482157765.png

 

 

Create a line chart and add to X-axis the Month, the facts to the Y-axis and add to the Legend the Year (This way you dont agregate you yearly values).

 

Then create a slicer for the year, and this way you can chose the years you want to display in the line chart

 

Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.