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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.