Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MitchellG
Regular Visitor

un-concatenate month and year on x axis

Hello,

 

I have a bar chart which looks like so: bins.PNG

The x-axis is composed of a date grouping where the bin size is 1 months.  My manager wants me to un-concatenate my x axis into two lines, with the month on the first line and year on the second line. My x axis would look something like this:

 

Example.png

Any help with this would be greatly appreciated.

 

Thanks.

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@MitchellG you need to have a date hierarchy (no matter if you have a date dimestion table. an auto date dimention table or just these columns in youe standalone fact table). Once you have / create this hieracrhy from these year/quarter/month/date or any combination of these columns then and only then you could enable this feautre by going to the X axis settings and turn off the toggle for concatenate labels:

SpartaBI_0-1652105806571.png

 



In case it answered your question, please accept it as a solution to help the other members find it more quickly.
Appreciate Your Kudos 💪
Showcase Report – Contoso By SpartaBI 
Website Linkedin Facebook 
This is SpartaBI!

View solution in original post

8 REPLIES 8
MitchellG
Regular Visitor

grouping2.PNG

 

Hello @AilleryO ,

 

As suggested, I created separate month and year columns but wound up with the above result, where my months are out of order

 

Hi,

If youy have a date hierarchy, the easy solution would be the one provided by @SpartaBI , in case you do not have hierarchy, you need to creat another column with month in number (FORMAT([Date] , "m") and use it to sort the one with month names.

Procedure to follow :

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column?tabs=powerbi-desktop

 

SpartaBI
Community Champion
Community Champion

@MitchellG you need to have a date hierarchy (no matter if you have a date dimestion table. an auto date dimention table or just these columns in youe standalone fact table). Once you have / create this hieracrhy from these year/quarter/month/date or any combination of these columns then and only then you could enable this feautre by going to the X axis settings and turn off the toggle for concatenate labels:

SpartaBI_0-1652105806571.png

 



In case it answered your question, please accept it as a solution to help the other members find it more quickly.
Appreciate Your Kudos 💪
Showcase Report – Contoso By SpartaBI 
Website Linkedin Facebook 
This is SpartaBI!

Hi @SpartaBI ,

 

I did what you said and created a date hierarchy and then turned off the concatenate labels setting, but I am still unable to achieve the desired result

 

Spartabi_resp1.PNG

 

@MitchellG this is really strange 🙂 This is the way to achieve it. Can you maybe share your file here? Through dropbox or something like that?

@MitchellG did you read my message?

Apologies, I read your first suggestion but I don't see any follow-up posts.

AilleryO
Memorable Member
Memorable Member

Hi,

 

You can use FORMAT function to create new columns, one with year and one with month and use them in your visual.

YearColumn = FORMAT( [Date] , "yyyy" )
MonthColumn = FORMAT( [Date] , "mm" )

Tell us if it works

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.