Forum Discussion
Trend Lines
Guys,
I am new to power bi and having an issue with Trend Lines. I have a dataset that has a date column and covers about 3 years of data. When I create a Clustered Column chart using the date the first visualization shows 3 columns one for each year where you can click each to drilldown if you want to month, etc. My issue is when viewing the initial chart with years I have the Trend Line option and can turn it on but when I drill down to the Month level it goes away....I really want it at the month level so tried removing Year and quarter from the Date Hierarchy so only Month is left but in this configuration I don't even have the trend as an option.
Please let me know what am I doing wrong?
phillip786 as noted earlier in this thread, the x-axis must be a numeric value for trend lines to work currently. Month name is text.
- phillip78610 years agoFrequent Visitor
Thanks for the reply...so you say that on the chart itself the category being a date type but displaying a month name which it does automatically it can't trend across that? Seems like you are saying that once I drilldown from Years I have to have the months displayed as 1,2,3,4,etc... makes no sense because if you then drilldown to days which are 1 - 30 it stil doesn't work.
I am not using a lookup that has month names in it it is just a Date column that automatically gets the date hierarchy see below how it disappears:
Initial chart trend okthis is the axis data a date type which converts to thisyou can see the trend line is availablethis is the view once you drilldown to quarters no trendlineno trend option at quarter leveleven when down to day level still no trend line
- Anonymous10 years agoNot applicable
phillip786 trend lines won't work below a text level in a hierarchy either. It will only work at the top level if the top level is a numeric value, and if any level below that is not a numeric value it will stop working for that level and all below it. It's pretty much all or nothing. You can't use the default hierarchy for dates; I suppose you'd have to construct your own fully numeric hierarchy. Hopefully this will be remedied in the future but for now that's how it is.
- phillip78610 years agoFrequent Visitor
Anonymous Thanks for the info, I got it to work by creating a new measure that was just the =Month() of the date column and used that in my trend by month chart. I hope they get this fixed or be able to have a Value/Label pair so we can have Month names while still keeping the trend line.
- Anonymous10 years agoNot applicable
you can use trend line on quarter level just with Quarter number.
- Anonymous10 years agoNot applicable
Anonymous sure technically you can but it's ugly at best, and worthless if you're looking at more than one year. You have to set the x-axis to "continuous" for trendlines to work, so the chart will only show auto-generated increments on that axis rather than the actual quarters.
As you can see, Acme Inc. was doing really well in Quarter Zero of 2016, a major improvement over the nosedive they took in Quarter Five of 2015.
Not to mention how bad it would look even if you could see the individual quarters labeled on the x-axis.
If I labeled quarters like that in a report that my execs have to show to other people, they would start wondering what they pay me for. But labeling it this way disables the trendline feature anyway, so fortunately it isn't even an option.
Good thing there are ways of manually calculating trendlines, because this feature is still mostly useless.