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
Patryk
Regular Visitor

Line Chart - show historic trends (sorted)

Beginner in PBI here. I want to visualise historical trends across few departments.

 

What I have (data):

 

DepartmentQ1'17Q2'17Q3'17Q4'17Q1'18Q2'18Q3'18Q4'18Q1'19
Dep10.0%2.7%0.7%0.0%0.0%0.0%0.0%0.0%0.0%
Dep21.7%2.5%0.7%1.5%1.5%1.0%0.0%0.0%0.0%
Dep30.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%
Dep40.0%0.0%0.0%4.0%0.0%0.0%0.3%0.0%0.0%
Dep50.0%0.0%0.0%0.9%0.0%3.0%0.3%0.0%0.0%
Dep62.9%3.0%0.0%0.0%0.0%3.0%1.5%2.0%1.6%
Dep70.0%0.0%0.0%3.6%3.6%0.0%0.0%0.0%0.0%
Dep80.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%
Dep90.0%0.0%0.0%1.3%1.8%3.0%0.0%0.0%0.0%
Dep100.0%0.0%0.0%5.8%3.1%4.0%1.3%1.0%0.7%
Dep110.0%0.0%0.0%3.9%0.3%2.0%0.9%0.0%0.0%
Dep120.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%

 

What I want to create (excel example):

 

visualisation

No matter how hard I try in PBI I cannot recreate this scenario that takes me 3s to create in excel. PBI does sort the data by score (percentage value) and Quarters are all overthe place. No matter what I do I cannot force it to sort by quarter and then go from Q1'2017 until Q1'2019.

 

If I replace quarters with actual dates it works ok, but the "31.03.2017" or March 2017 datapoints looks countrintuitive and make the data harder to digest than simple quarters. Is there something I'm missing here?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Patryk - The quarters may be sorting alphabetically instead of chronologically. To fix this problem, Power BI allows you to sort a column by another column. There are a couple different places you can implement this, either on the Modeling Ribbon Tab, or the Model View. In either case, select your Quarter column, and sort by a column that orders the quarters. 

 

Sort by Another Column.PNG   

Sort By Month Number.PNG

Hope this helps,

Nathan

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@Patryk - The quarters may be sorting alphabetically instead of chronologically. To fix this problem, Power BI allows you to sort a column by another column. There are a couple different places you can implement this, either on the Modeling Ribbon Tab, or the Model View. In either case, select your Quarter column, and sort by a column that orders the quarters. 

 

Sort by Another Column.PNG   

Sort By Month Number.PNG

Hope this helps,

Nathan

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.