Forum Discussion
Scatter Plot creates values in the axis x when multiple months are selected
- 1 year ago
Thanks! I found a solution, I used Julian Date format in my x axis and it worked without problem. This is the code.
julian_measure=IF(ISBLANK(table[date]),0,DATEDIFF(DATE(1900, 1, 1), table[date], DAY))
Hi julsr
Thanks for reaching out to the community!
What you're experiencing in the scatter plot is a common issue when Power BI auto-aggregates or incorrectly interprets date-like fields — especially when using concatenated strings like yyyymmdd instead of proper date types.
Here’s how to resolve it:
- Ensure your X-axis field is of Date data type, not text. Concatenated date strings (like yyyymmdd) can cause the scatter plot to treat them as categorical or numeric, leading to odd plotting behavior (like values going up to 99).
- Use a proper date column for the X-axis, such as a Date type column in your data model, not a calculated text-based column. You can always format this column visually if you want a custom display (e.g., "MMM dd").
- If you're using a calculated column, try creating it like this:
***************************************************
DateFormatted = DATE(Year, Month, Day)
***************************************************
Then use this in the scatter plot's X-axis.
Also, make sure the X-axis is set to continuous (not categorical), which allows Power BI to render the data points appropriately over time.
Let me know if this resolves the issue, and if it does, please mark it as the accepted solution so others can benefit!
Best regards,
Srikanth
Power BI & Fabric Community Support Team
- julsr1 year ago
Continued Contributor
Thanks! I found a solution, I used Julian Date format in my x axis and it worked without problem. This is the code.
julian_measure=IF(ISBLANK(table[date]),0,DATEDIFF(DATE(1900, 1, 1), table[date], DAY))