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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lddiaz
Frequent Visitor

Line chart - showing two different years of data with 1 line

Hi all,
Part of a report I am creating for my manager requires a line chart with a single line showing 12 months of data. The data dates back to 2017, so it should show 12 months of data, up to the most recent month and year. 

 

Right now, the line chart looks like this:

actual-linechart.PNG

 It needs to look something like this:

 

 

want-linechart.PNG

 

Every time we reach a new month in 2018, the month to the left (April 2017), should disappear so we can make room for April 2018 on the right.

 

I’m having a difficult time creating this in Power BI. I have tried a few things: creating a single date column in Excel with both 2017 and 2018 months (Power BI treats them all as one year instead of 2 different ones), creating two columns named month and year and concatenating them within Power BI with their corresponding data (Power BI still treats them all as one year instead of 2 different ones).

 

A concern here is that Power BI likes to organize the months in chronological order, when in my desired visual, I don’t want chronological order by month name; I want order by year.

 

Is my desired visual possible in Power BI? I would appreciate any guidance/suggestions on this. 

Thanks!

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@lddiaz

 

Hi, To had separate years-month in the visual

 

Axis Concatenate Year-Month.gif

 

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@lddiaz

 

Hi, To had separate years-month in the visual

 

Axis Concatenate Year-Month.gif

 

Regards

 

Victor

Lima - Peru




Lima - Peru

Ahh! Thank you. What a simple fix. 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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