Forum Discussion
Time vs Time Scatter Chart
- 3 months ago
Hey AsyrafDzul,
Here is a neat trick! Since scatter plots require numeric axes, we convert time values into HH.MM decimal format - readable as time (dimension), plottable as a number (measure). Example:
// Calculated Column OfficeBadgeIn_HHMM = VAR Hours = HOUR('TEST'[OfficeBadgeIn]) VAR Minutes = MINUTE('TEST'[OfficeBadgeIn]) RETURN Hours + ( Minutes / 100 )The HH.MM format is numeric enough for Power BI to plot, and intuitive enough to read as time (use appropriate call-outs for business users).
Hope it helps! Please do share if you find other workarounds.
Best,
Harshit
- 3 months ago
Hi AsyrafDzul ,
Thank you stoic-harsh for your valuable innputs.
Try this:Click dropdown on X Axis field
Set aggregation = Average or Sum
Same for Y Axis
Do NOT choose "Don't summarize"
If you still see grouped points after adding Staff Name to Values, create a unique row ID:
RowID = 'Table'[Staff Name] & "-" & FORMAT('Table'[Date],"yyyymmdd")
Then use RowID in Values instead of Staff Name.
Also keep your time decimal columns as Calculated Columns, not Measures. That will give you one dot per row/record instead of aggregated totals.
Hope this helps.
Hey AsyrafDzul,
Here is a neat trick! Since scatter plots require numeric axes, we convert time values into HH.MM decimal format - readable as time (dimension), plottable as a number (measure). Example:
// Calculated Column
OfficeBadgeIn_HHMM =
VAR Hours = HOUR('TEST'[OfficeBadgeIn])
VAR Minutes = MINUTE('TEST'[OfficeBadgeIn])
RETURN
Hours + ( Minutes / 100 )The HH.MM format is numeric enough for Power BI to plot, and intuitive enough to read as time (use appropriate call-outs for business users).
Hope it helps! Please do share if you find other workarounds.
Best,
Harshit
Hi Mr. stoic-harsh ,
- stoic-harsh3 months agoSuper User
Hello Sir 😆,
Simply load your data without any transformation into the model (I assume, your table contains OfficeBadgeIn and SiteBadgeIn values in time format). Then, use the DAX I provided in previous reply, to create 2 columns in HH.MM decimal format (don't use New Measure here). Let me know in case of any questions.
Best,
Harshit