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.
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
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |