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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Line Chart showing a gap of 5 Months in between each Month such that in between Months were hidden.

Hello Experts,

 

I want to show 3 years data in a line chart in x-axis, by a year-month combination lets say starting from 2019 Jan and then showing only 2019 July like wise all the 3 years months will be fitted in a single line chart so that in between months were hidden in showing. My main intention is if we present like this way it will be more engaging for the end user. It is a easy one I believe but I am new to Power BI. 

 

Any help is appreciated. Thanks in advance.

4 REPLIES 4
lucadelicio
Super User
Super User

if I understand correctly you can try to create a calculated column on the data table.
Sign with 1 only the month that you want to show and with 0 the others.
Then filter the x axis with the 1 values only.
You can write a dax like this:
ShowValues = SWITCH(Datatable[MonthNumber], 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 1, 0) 
Let me now if it is a solution.
If you post a pbix i can try to resolve on it.



Luca D'Elicio

LinkedIn Profile
amitchandak
Super User
Super User

@Anonymous , You can change axis type to categorical

Axis_type.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi Amith,

Thanks for the quick reply. 

It is not allowing me to do. Currently I created a calculated table with year month , year, month combination columns writing a dax. I am using that year month combination column in our line chart x axis. Since the column has many values ranging from 2019, 2020,2021,2022 I am unable to show these with a gap interval of 6 months.

I am able to show these in x axis but with continuous month year combination.

I am wondering from the past 3 hours how to do so

 

 

 

 

Hi, @Anonymous 

 

Can you provide some sample data or simple pbix files? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures.

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.