Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello BI geniuses,
As the title says, I'm trying to add trend line to my line chart that has a categorical X-Axis. Further more, the Y-Axis value is a measure.
The measure is Book to Bill: SUM(NetSales)/SUM(NetRevenue)
The X-Axis is period based. There are 12 periods, each one representing a month. The first months of fiscal year 2026 would show as such: 202601, 202602, 202603, etc.
I've created a measure for the trend line that seems to work, but from 202512 to 202601 the trend line makes a sharp dip.
How do I make my trend line a single straight line like when my X-Axis is continuous.
Below is a capture of my current trend line when the X-Axis is continuous and categorical
I've provided the formula to my trend line measure below ('_Book to Bill' is what is in my line chart Y-Axis above; _Book to Bill in measure below = B2B in line chart Y-Axis above):
Once again,
How do I make my trend line a single straight line like when my X-Axis is continuous.
Any help would be highly appreciated!
Thanks for your time!
-Tom
Solved! Go to Solution.
Hey there, thanks for the response. I appreciate your insight. Unfortunately the suggestions didn't work out for me. What I ended up doing was translating the fiscal periods into 'calander end' dates. That way the x axis is forced to be a date and I can then set the x axis to be continuous rather than categorical. However, the x axis displays callendar months now rather than the fiscal periods (202601, 202602, 202603, etc.)
From what I've seen and tested, there is no solution to the issue that I was having, only a work around.
Hi @tmendoza ,
Thanks for sharing the update. This workaround will help other members facing the similar issue, resolve the query.
Thanks for reaching out on Microsoft Community Forum
Hi @tmendoza ,
Just wanted to check if you got a chance to review the suggestions provided and whether that helped you resolve your query?
Thank You
Hey there, thanks for the response. I appreciate your insight. Unfortunately the suggestions didn't work out for me. What I ended up doing was translating the fiscal periods into 'calander end' dates. That way the x axis is forced to be a date and I can then set the x axis to be continuous rather than categorical. However, the x axis displays callendar months now rather than the fiscal periods (202601, 202602, 202603, etc.)
From what I've seen and tested, there is no solution to the issue that I was having, only a work around.
Hi @tmendoza ,
Just wanted to check if you got a chance to review the suggestions provided and whether that helped you resolve your query?
Thank You
Hi @tmendoza ,
Try these-
Convert Categorical to Numeric
Use Continuous Axis
Hope this helps!
Hey there thanks for the response. The periods are currently formatted as whole numbers. Changing the X-axis from Categorical to continuous creates a large range of periods that don't actually exist. You can see it in the second picture in my post. There are only twelve periods, but when the axis is continuous, there are 100 periods, which just doesn't work.
Not sure about your ask here, but isnt the dip due to the data is that way ?
Thanks for responding to my post!
I updated the post to make it more clear.
The ask is,
how do I make my trend line a single straight line like when my X-Axis is continuous.
The dip is due to the large change in Sales and Revenue between fiscal years. I agree that the math is right.
However, visualy, I need a single straight line.
| User | Count |
|---|---|
| 57 | |
| 43 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |