Forum Discussion
Scatterplot with Categorical Date x axis NO AGGREGATION
- 6 months ago
Without getting into fleshing out your semantic model, etc., you could just add a calculated column to convert your dates to integers. Then, if you use those date integers in the x-axis, you can use "Don't summarize" on the field you want to split up on each tick rather than aggregate. And also it should be trivial to toggle on the trendline (if I'm understanding what you are trying to do there).
Example with your data.
Sample
Sales Order Order Posted Date OrderTAT Item Count 20782752 12/2/2024 2 3 20792956 12/4/2024 3 1 20792957 12/4/2024 3 1 20792964 12/4/2024 4 1 20793464 12/5/2024 3 1 20807985 12/11/2024 3 1 20807987 12/11/2024 3 1 20807989 12/11/2024 3 1 20807990 12/11/2024 3 1 20810497 12/12/2024 2 1 20810498 12/12/2024 2 1 20810500 12/12/2024 2 1 20831659 12/23/2024 3 2 20831662 12/23/2024 3 2 20831664 12/23/2024 3 2 20831673 12/23/2024 3 2 20831674 12/23/2024 3 2 Calculated column
Day Num = CALCULATE( MIN( 'Sample'[Order Posted Date] ) ) - MIN( 'Sample'[Order Posted Date] )And here is scatter chart with field wells - toggled trendline on without any additional action
And, to get the above, I set up some dynamic axis ranges so it looks little better (this is snip of format pane)
xmax = MAX( 'Sample'[Day Num] )+1ymin = MIN( 0, MIN( 'Sample'[OrderTAT] ) * 1.1 )ymax = MAX( 'Sample'[OrderTAT] ) * 1.1(and, as you can see from snip, just set xmin to -1 in pane as the DAX in calculated column ensures min is always 0 so by extension -1 is always a good buffer
Hi,
A scatter chart numeric fields on both axis. You can create a line chart and then remove the line (retain only the markers).
Hope this helps.