Forum Discussion
Creating a line graph
- 1 year ago
in pq you can create a new column
= if [2025] = "January" then 1
else if [2025] = "February" then 2
else if [2025] = "March" then 3
else if [2025] = "April" then 4
else if [2025] = "May" then 5
else if [2025] = "June" then 6
else if [2025] = "July" then 7
else if [2025] = "August" then 8
else if [2025] = "September" then 9
else if [2025] = "October" then 10
else if [2025] = "November" then 11
else if [2025] = "December" then 12
else nullthen make sure the new column's data type is whole number and sort 2025 by the new column
at last sort by the 2025 column
pls see the attachment below
I ran it through PowerQuery. Obviously, I can post real data on here but after running through PowerQuery, this is (kind of) what is loaded.
in pq you can create a new column
= if [2025] = "January" then 1
else if [2025] = "February" then 2
else if [2025] = "March" then 3
else if [2025] = "April" then 4
else if [2025] = "May" then 5
else if [2025] = "June" then 6
else if [2025] = "July" then 7
else if [2025] = "August" then 8
else if [2025] = "September" then 9
else if [2025] = "October" then 10
else if [2025] = "November" then 11
else if [2025] = "December" then 12
else null
then make sure the new column's data type is whole number and sort 2025 by the new column
at last sort by the 2025 column
pls see the attachment below