Forum Discussion
Recent change in X-axis behaviour to continuous axis for categorical chart
Hi, Anonymous
According to your description, when you put a field in "Legend", the X-axis is not showing continuous values.
First for "Legend", its main function is to group and evaluate the values displayed on your Y axis, and then display them in our visual object.
When our Legend has different discrete values for each X-axis, then it will be displayed in dots.
Consecutive values are only displayed when our Legend has the same grouping for the X axis.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Try a test case, where you have a legend that groups data by category for example. Then have data plotted against a date on a line graph visual. This will work fine in powerbi desktop, but will break when published, switching the x-axis from continuous on date to categorical on date.
This is certainly a bug that was introduced over the weekend, and Microsoft needs to realise this, there have been countless other posts on the forum on this topic. Please look to fix. How are people supposed to trust the software when what they create changes on publish? The more time Microsoft denies this is a bug, the deeper the bug will get and it will be harder to fix. Please look into this!
Cheers,
QF
- v-yueyunzh-msft4 years ago
Community Support
Hi, Anonymous
According to my test, I selected "continuous" on the X-axis in Power BI Desktop, but after publishing to Power BI Service, it still displays "continuous" in the Editing view.
If my understanding is inconsistent with your question, you can provide us with corresponding screenshots so that we can help you better.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Anonymous4 years agoNot applicable
Hi Aniya,
Here I will be using the "Retail Analysis Sample" PBIX file.
After downloading the file, opening it, creating a new page, I make a Line Chart view with:
X Axis: Store -> "OpenDate" as a date hierarchy,
Y-Axis: Sales -> "Average Unit Price"
Legend: Item -> "Category"
I then drill down, "expand all", to the lowest level of data. This is what it looks like in desktop:
Notice the X-Axis is continuous:
Then I publish the report. This is what it looks like in the service:
Notice the X-Axis is now categorical, and broken. There is no way to change it back in the service.
This is a bug, please look to resolve. I will look to make a separete post about this also.
Cheers,
QF
- jareynolds4 years agoRegular Visitor
I am able to replicate the same issue Anonymous is experiencing in Power BI Desktop after installing the September 2022 release. It seems to be a (hopefully) unintended side effect of the recent change to hierarchical x-axis behavior.
As others have stated, the issue appears to occur when using a Line visual with a built-in Date hierarchy on the x-axis, and only when a legend is applied.
Using the same visual setup as the above example, also from Retail Analysis Sample:
- X-axis is Continuous by default when set to OpenDate (non-hierarchical)
- When the x-axis is changed to use the built-in date hierarchy for OpenDate, the hierarchy is now fully expanded by default, but the x-axis is now Categorical and the Continuous x-axis is no longer available.
- Prior to the September update, the default behavior was a Continuous x-axis when the built-in date hierarchy was fully expanded, but it is now Categorical and cannot be changed.