Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have some baby name data. In the first column, I have a long list of baby names. In the subsequent columns I have every year from 1900 to 2017, with the number of babies born with each name in each year.
I want to create a line graph where each name can be selected in the slicer and the graph then shows popularity of that name in each year. I can create a line graph and then a slicer with the name column dragged into the slicer.
However, I'm not sure how to get the x axis to display each year from 1900 to 2017, with the corresponding data in the graph.
I've attached a screenshot of the data and the potential line graph.
Solved! Go to Solution.
I think that the easy way to handle it is to Unpivot your table :
In the query editor, select the Name column -->right click --> Unpivot other columns
Now you have table like :
jon 2010 5
jon 2011 4
jon 2012 6
after that in the line chart visual, put the year(attribute) in the axis feild the name in the Legend and the value in the value.
Hope it will solve your problem
I think that the easy way to handle it is to Unpivot your table :
In the query editor, select the Name column -->right click --> Unpivot other columns
Now you have table like :
jon 2010 5
jon 2011 4
jon 2012 6
after that in the line chart visual, put the year(attribute) in the axis feild the name in the Legend and the value in the value.
Hope it will solve your problem
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.