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
Josevolquez85
Regular Visitor

How to prevent a line chart from showing months with no data

Hello community, I hope you are very well. As I show in the following image, I have a data model, with a column "datetime" and another that shows temperature values "TEMP1-BONAL":
Image 1.jpeg
As shown in the bar chart in 2022 there is no data for several months such as January and April. On the line chart, however, lines are shown for the months of January and April. I tried filtering the "datetime" column so it doesn't show blank values, but it didn't work:
Image 2.jpeg

 

When I plot the temperature against an index column, it no longer shows the straight lines as on the graph in the first image:
Image 3.jpeg

 What is the mistake?

 

Thanks for the support.

 
 
4 REPLIES 4
TheoC
Super User
Super User

Hi @Josevolquez85, if the post I provided solves your issue, can you kindly accept is as the solution to allow other Community members to search for it if they experience the same challenge. 

 

Thanks heaps in advance.

 

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Thank you TheoC,

Despite using the categorical option, I can't see all the data in the graph without having to scroll.

 

I need solve this to close the issue, please.

@Josevolquez85 your X Axis should be using the Calendar table as the basis.  Currently, you're using it from your Data table.  From here, switch the settings back to CONTINUOUS instead of CATEGORICAL. 

 

TheoC_0-1685993068688.png

 

Let us know how that goes.

 

Thanks,

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

TheoC
Super User
Super User

Hi @Josevolquez85 

 

The issue you're experiencing is because the X-Axis is set to "Continuous" rather than Categorical.  

 

TheoC_0-1685313056333.png

 

Change it to Categorical and this will correct the issue.

 

The context of the above is because fields or columns that are DateTime or Date or Time can be "continuous."  Power BI offers the ability to have these fields represented as "Continous" (i.e. uninterrupted) or on a "Categorical" basis (i.e. whatever exists in the data).

 

Hope this helps.

 

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

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.