Forum Discussion
Dynamic Axis on Bar chart
- 1 year ago
Hi swalke ,
Its because your “Increasing/Decreasing” (or other assignment groups) are calculated by a DAX measure that depends on sales and the current quarter, the actual categories can change (appear/disappear) every time your date slicer moves. That makes your chart axis dynamic and hard to keep stable, which is frustrating for both devs and users.
The best practice is to create a separate table in Power BI that lists all possible assignment categories you want to show on your chart, like “Increasing”, “Decreasing”, “Base”, “Medium”, “High”, etc. This is sometimes called a “scaffold” table or static axis.Steps:
-
Create a Categories Table:
Go to “Home” → “Enter Data” and add a single column with every category you need. -
In your bar/column chart, use this new table as your X (or Y) axis, not the assignment calculated by your measure.
-
Write your DAX measure to count customers (or whatever you need) for each category, using your logic for “Increasing”, “Decreasing”, etc.
- Put your AssignmentCategory field from the static table on the axis, and your measure as the value. Now, all categories will always show, even if there are zero customers in a group for the current slicer selection.
-
Hi swalke ,
I just wanted to check if your issue has been resolved. If you still have any questions or need help, feel free to reach out I’m happy to assist.
Thank you for being an active part of the community. Looking forward to hearing from you!
Best regards,
Lakshmi
Hi swalke ,
We haven’t heard back from you regarding our last response, so I just wanted to check in to see if you were able to resolve the issue. If you have any further questions or need assistance, please feel free to let us know.
Best Regards,
Lakshmi
- v-lgarikapat1 year ago
Community Support
Hi swalke ,
We haven’t heard back from you regarding our last response, so I just wanted to check in to see if you were able to resolve the issue. If you have any further questions or need assistance, please feel free to let us know.
Best Regards,
Lakshmi