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:

where is my trendline?

(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:

x axis continuous or categorical

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:

woohoo trend line

(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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *