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
OPS-MLTSD
Post Patron
Post Patron

How to show Monthly change in Line Chart without using Date/Time Intelligence

Hello,

 

I have a Line Chart that looks like this:

OPSMLTSD_0-1638458535806.png

 

I want to show monthly data but right now the x-axis is showing bi-weekly data. 

In my x-axis, I have the Exit Date (which is in a standard date format - e.g. October 26, 2021). For my Values, I am doing a Distinct Count of Client IDs. I was wondering, is there a way to change the x-axis so that only the months are shown? So instead of having Sep 12, Sep 26, Oct 10, Oct 24, the axis should show Aug 2021, Sep 2021, Oct 2021....etc.

 

Please note that I have turned off Date/Time Intelligence to save space in my report. If someone could please help me figure out how to change the x-axis to show month only, that would be great. Thank you

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @OPS-MLTSD 

 

You can add a Year Month column to your table with "mmm yyyy" format. Use this column to replace Exit Date column on Axis.

Year Month = FORMAT('Table'[Date],"mmm yyyy")

21120602.jpg

 

As this Year Month column is of Text type and is sorted alphabetically, you could add another column like YearMonthNumber = YEAR('Table'[Date])*100+MONTH('Table'[Date]) and sort Year Month column by YearMonthNumber column, then it will display in month order on X axis. See Sort one column by another column in Power BI Desktop

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

4 REPLIES 4
OPS-MLTSD
Post Patron
Post Patron

I have not accepted a solution yet, I am not sure why this was chosen as a solution. I have tried to create a Year Month in my primary table but it did not work for me. I have other tables linked to the primary table. I have looked online to creating a separate Date Dim table, which is what I am working on right now

v-jingzhang
Community Support
Community Support

Hi @OPS-MLTSD 

 

You can add a Year Month column to your table with "mmm yyyy" format. Use this column to replace Exit Date column on Axis.

Year Month = FORMAT('Table'[Date],"mmm yyyy")

21120602.jpg

 

As this Year Month column is of Text type and is sorted alphabetically, you could add another column like YearMonthNumber = YEAR('Table'[Date])*100+MONTH('Table'[Date]) and sort Year Month column by YearMonthNumber column, then it will display in month order on X axis. See Sort one column by another column in Power BI Desktop

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

thank you! I will try this and get back to you shortly

Hi @OPS-MLTSD 

 

Does my solution work? Any update?

 

Best Regards,

Jing

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.