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
jiinson
Helper I
Helper I

Grouping x axis

Capture.PNG

 

Dear tutors,

 

I have assigned job that display 90days(points) data but axis should be shown as month or week since right now x axis looks very messy. How would you guys solve this problem?

 

Thanks in advance.

 

Best Regards,

Jiin Son

7 REPLIES 7
v-shex-msft
Community Support
Community Support

Hi @jiinson,

 

>>I have assigned job that display 90days(points) data but axis should be shown as month or week since right now x axis looks very messy. How would you guys solve this problem?

The simply function of your requirement is add a calculated column to format your x axis column to date type, then use the calculate column as the x axis.
Right click on new column to change the mode to date hierarchy, then you can simply use date hierarchy column to switch the displayed items.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

9d98ecf2-07ea-42e0-be14-e75df9830a5f.jpg

 

This graph is exactly what I want. A few labels at x axis and specific data points between years. 

 

Thanks,

Jiin Son

Vvelarde
Community Champion
Community Champion

@jiinson

 

Verify is X-Axis is set to Continuous

 

Continuos.png




Lima - Peru

When I set type of xaxis as continuous, it automatically change to Categorical.

 

The value I use for this line chart is

CY = CALCULATE(SUM(Table[Sales Amount]), DATESYTD('Date'[Date]))

PY = CALCULATE([CY], SAMEPERIODLASTYEAR('Date'[Date].[Date]))

'Date' is a date table.

 

Thanks,

Jiin Son

truch2
Frequent Visitor

To change how the axis is displayed, without changing the data column itself, try using groups. Select your graph. Under the "Axis" label should be your date column containing the values on your x-axis (02/01, 03/01, etc.). Click on the small grey down arrow and select "new group". Choose "Group Type" as "List". Now you can put your x-axis together anyway you see fit. Also, if you just want to change the names, put each item in a group by itself and rename the group as you see fit. Just be careful, sometimes powerbi will reorder the axis in a way that's unpleasant (text axis are especially vulnerable to this). Good luck!

@truch2Thanks for reply.

 

I made a group but when I use groups as an axis I can't see 90 data points. 

 

Best Regards,

Jiin Son

Perhaps I misunderstood what you watned to do. If you put every item in the same group, only one item will show on the axis. To change the title of an item, it needs to go into a group with only itself.

 

However, I think what you want is to change the axis from "categorical" to "continuous".  Assuming that your column was imported as a number type, you should be able to do this easily. Click on the visual. Click on the Format options (the paint roller icon). Click on "x-axis" and make sure the "type" is set to "continuous". 

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.