Categories: Power BI

Where’s the Trend Line in Power BI Desktop?

A quick blog post on finding where the trend line is hiding in Power BI Desktop. Docs will state it is in the analytics pane for certain types of visualization. However, it doesn’t always show up:

(I really resisted the urge to post another “Dude, where is my car” image)

So why did the trend line disappear? Turns out the X-axis needs to be continuous, not categorical. You can change this in the properties of the X-axis:

However, still no trend line. This was caused by the effect that the attribute Year in my model had a string data type, and not integer (because why would I want to aggregate years?). Once I changed it to whole number in the query editor, my problem was solved:

(Still no percentile line though…)

This restriction of “continuous and numerical” means you can’t for example use a Year-Month column (e.g. 2017-06). I hope they solve this soon.


------------------------------------------------
Do you like this blog post? You can thank me by buying me a beer 🙂
Koen Verbeeck

Koen Verbeeck is a Microsoft Business Intelligence consultant at AE, helping clients to get insight in their data. Koen has a comprehensive knowledge of the SQL Server BI stack, with a particular love for Integration Services. He's also a speaker at various conferences.

View Comments

    • I'm not sure what you mean. I think you can have a trend line when you have a date hierarchy and you drill down to months? I'd have to test it out.

  • "Once I changed it to whole number in the query editor, my problem was solved:" Can you give a screenshot of how to do this? I only see the options to change the entire field's data type, not just the year attribute. Thanks!

    • What do you mean with the "entire field"?
      Do you have a auto-created data hierarchy?

  • One other issue I found is that the trend lines goes when there is no data on the chart. Let's say I have a chart with months the my data starts in March and continues to the rest of the year. The trend line starts at January even though there is no data for January and February. I do not want it and want the line to start at March. Do not see any setting for that.

Recent Posts

Get row counts of all tables in a Microsoft Fabric warehouse

I loaded some built-in sample data from Wide World Importers into a Fabric warehouse. You…

3 days ago

dataMinds Saturday 2024 – Session Materials

It was great being at dataMinds Saturday 2024 this past weekend. A great crowd of…

6 days ago

Check your regions people

Today I was having a nice discussion with some colleagues about Fabric and pricing/licensing came…

3 weeks ago

Book Review – Deciphering Data Architectures

I recently purchased and read the book Deciphering Data Architectures - Choosing Between a Modern…

4 weeks ago

Fabulous Stuff in Fabric – Part 5: Folders in Workspaces

A while ago I had a little blog post series about cool stuff in Snowflake. I’m…

1 month ago

Speaking at dataMinds Saturday & Techorama 2024

I have the pleasure to announce I'll be presenting at two conferences this spring. The…

2 months ago