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

how to specify start range in x-axis for categorical type.

I am trying to create a line chart with "Years" on x-axis, from 2015-2019. For each employee a separate chart is being created. 

 

Each line in the chart represents certain categories and I have to put markers on them. Which is why I want to do it this way.

 

When I convert x-axis type to categorical, for those employees which joined recently, their years from 2015-2018 are missing, the axis only shows 2019 year. 

 

I can fix this in continuous type by specifying starting range for x-axis. Any idea how to do the same for categorical type of x-axis. 

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @sbharti123 

Just enable Show items with no data in Power BI as below:

https://docs.microsoft.com/en-us/power-bi/desktop-show-items-no-data

And you could use a dim date table then create a relationship with data table and then Show items with no data.

 

Best Regards,

Lin 

 

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

View solution in original post

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi, @sbharti123 

Just enable Show items with no data in Power BI as below:

https://docs.microsoft.com/en-us/power-bi/desktop-show-items-no-data

And you could use a dim date table then create a relationship with data table and then Show items with no data.

 

Best Regards,

Lin 

 

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

Hi Lin,

 

Thank you so much, that was so easy. I created a date dimension table, which has all the years that I require (or the ones in my data already). Then rather than having the x-axis as the 'year' from the fact table, I used the 'year' from this new date dimension table.

 

After that I enabled Show items with no data on the Year, and that fixes everything. 

Thak you so much for your support.

 

Regards,

Sumit

Anonymous
Not applicable

@sbharti123 

Are you using a date table which is linked to your data table? If you have specified your year figures directly in the data table there will be missing info unless data is there for the selected period. 

Thanks.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

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.

June 2025 community update carousel

Fabric Community Update - June 2025

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