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
JDeMaro22
Frequent Visitor

Custom sort X axis Values on Line Chart

Hello,

 

My CEO would like the Date X-Axis values to read Dec-April 2022 then Jan-March 2023. How can I custom sort these values? 

 

Thanks for your time,

 

JDeMaro22_0-1684352042835.png

 

4 REPLIES 4
JDeMaro22
Frequent Visitor

@Syk 

 

I tried writing it but I'm not good with DAX yet. So its an IF formula = year, month = 1

 

JDeMaro22_0-1684419979306.png

 

Syk
Super User
Super User

You SHOULD tell the CEO "No". It makes no sense and will confuse anyone looking at the graph.

But, you can create a calculated column to and sort your date based on the new column.

Syk_0-1684352864728.png

 

JDeMaro22
Frequent Visitor

What would the calcuated column consist of to sort this accordingly?

For such a specific sorting it would have to be something like 
if year = 2022 and month = December -> 1
if year = 2022 and month = November -> 2
and so on until you get the desired result

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.