Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Trend line is not available when field type is text or x-axis type is not continuous.
For Years, trend line works:
But for quarters and months don't work:
What is the solution for quarters and months?
Hey there! I've looked everywhere and honestly couldn't find a solution but I somehow managed to work it out somehow.. hopefully this is the issue you're looking for to solve.
This is like my 3rd time using Power BI so please excuse if im wrong.
The issue is that you can only use a Trendline if your X-Asis is numerous - but dont worry I got a fix where its numerous but will still show "Jul 2017" as an example.
1. Create Column Month-Year:
Month-Year = FORMAT([Date],"MM-YYYY")
2. Set Column Format to yyyy-mm
3. Create Column for Order:
Order = YEAR([Date])*100+MONTH([Date])
4. Sort Column Month-Year by Order
5. Add Month-Year to the X-Axis first. ( DO NOT ADD ORDER - works added too but drilldown works bad? )
6. Enable Trendline 🙂
I hope this is actually what you're looking for and sorry that im a bit late. Please let me know.
- Anonymuser
@j_w @Anonymous
Thank you for your response. I was looking for a solution to the same problem and am happy that you took the time to respond, even if it were a few years ago. The solution works.
Did you ever find a solution to this? I too Have text field for Qtr-Wk ( Q3-04) and need to place a trend line.
Hi @Anonymous
Thanks, tried Quarter and Month from a date hierarchy, but still not working.
And the in the report, the financial year (starts from April) first quarter includes Apr, May and Jun, which is not equal to the quarter in date hierarchy.
Hi @j_w
You can convert month to date and it should work, it works for me.
For quarter, you could change the format a little. Try Qtr2 = right(Table1[Qtr],4)&left(Table1[Qtr],5). Now the sorting would work (See screenshot below).
Hi @Anonymous
Thanks for your ideas.
I guess you might misunderstood my question, I want to enable "adding trend line" for quarters and month but not sorting.
I tried your ideas, "adding trend line" is still not available:
Thanks.
User | Count |
---|---|
96 | |
87 | |
78 | |
72 | |
69 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |