Forum Discussion
adding date column to x axis in a stacked bar chart getting count of date column
- 2 years ago
Hi Meera556
Since a graph is a visual representation, it's highly recommended to attach an example of the data and the desired outcome to better understand your objectives.This will help us grasp your requirements more effectively, provide a truly relevant solution, and avoid unnecessary back-and-forth communication based on assumptions.
Nevertheless, I'll attempt to explain the logic behind graphs in the hope that it will be helpful.
Unlike tables where the "don't summarize" option can be used, graphs are designed for aggregations. Therefore, it's not possible to display every single data point on the axis representing values (which determines the size of the shapes in the graph).
Consequently, if you want to create a graph with dates on the X-axis, you can use a column chart since it has categories on the X-axis.
like in the attached picture :In contrast, a bar chart is a graph where the X-axis represents aggregated values, so it cannot be used with dates (since the size of the bar cannot be determined based on the date).
Dates can only be displayed on the Y-axis, which represents X-axis categories.
PBIX with examples is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- Meera5562 years ago
Helper I
Hi,
Thanks for your reply
I need the result as individual date values on x axis but I'm getting the count of date values
- Ritaf19832 years ago
Super User
Hi Meera556
Since a graph is a visual representation, it's highly recommended to attach an example of the data and the desired outcome to better understand your objectives.This will help us grasp your requirements more effectively, provide a truly relevant solution, and avoid unnecessary back-and-forth communication based on assumptions.
Nevertheless, I'll attempt to explain the logic behind graphs in the hope that it will be helpful.
Unlike tables where the "don't summarize" option can be used, graphs are designed for aggregations. Therefore, it's not possible to display every single data point on the axis representing values (which determines the size of the shapes in the graph).
Consequently, if you want to create a graph with dates on the X-axis, you can use a column chart since it has categories on the X-axis.
like in the attached picture :In contrast, a bar chart is a graph where the X-axis represents aggregated values, so it cannot be used with dates (since the size of the bar cannot be determined based on the date).
Dates can only be displayed on the Y-axis, which represents X-axis categories.
PBIX with examples is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.