cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jiinson Regular Visitor
Regular Visitor

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

Re: Grouping x axis

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!

jiinson Regular Visitor
Regular Visitor

Re: Grouping x axis

@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

truch2 Frequent Visitor
Frequent Visitor

Re: Grouping x axis

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". 

Community Support Team
Community Support Team

Re: Grouping x axis

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 Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
jiinson Regular Visitor
Regular Visitor

Re: Grouping x axis

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

Super User
Super User

Re: Grouping x axis

@jiinson

 

Verify is X-Axis is set to Continuous

 

Continuos.png




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




jiinson Regular Visitor
Regular Visitor

Re: Grouping x axis

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