Forum Discussion
Handling fall time change in continuous Line Chart (also, how to format the X axis?)
- Anonymous5 months ago
Hi mjc123 ,
There are potentially two workarounds in your scenario, You can address this by creating a new calculated column that explicitly handles the duplicate hour scenario instead of letting Power BI aggregate it implicitly. The idea is to build a column that detects when the same Ept timestamp appears more than once (like the repeated 01:00 AM during DST change) and slightly differentiates or tags those rows so they are treated as unique points on the axis. For example, you can use DAX to count occurrences of each timestamp and append a sequence or offset to the duplicate instances, which is potentially being used by you currently if I am not wrong. Another workaround is, you can handle this at the measure level by creating a DAX measure that intentionally ignores one of the duplicate timestamps so the visual doesn’t aggregate both values. The idea is to rank rows for each repeated Ept value (using a stable column like Utc), and then return the value only for the first occurrence while blanking out the rest. This way, the visual plots a single point for that hour without summing duplicates in Power BI.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Hi mjc123 ,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Regards
Sorry - I was on vacation, just got back last night.
in terms of the most recent response from grazitti_sapna, I'm seeing this:
The problem is that now it looks correct, but we're back to the issue of aggregating that Ept hour. As you can see from the data you generated yourself:
There is no row with a Value = 27. Instead it's adding 12 + 15 for the two "1:00:00 AM" hours.
To be clear, using your data there, I want to see this chart:
but with this x-axis labelled as some variation of: "12:00 AM, 01:00 AM, 01:00 AM, 02:00 AM, 03:00 AM, 04:00 AM, ..."
I say variation because we could even do something like this:
"12:00 AM ED, 01:00 AM ED, 01:00 AM ES, 02:00 AM ES, 03:00 AM ES, 04:00 AM ES, ..."
Anonymous, you asked for "sample data that covers your issue or question completely, in a usable format". You could honestly use the data grazitti_sapna created, but here is a full month which is more applicable to what I'm doing:
let
base64Str = "fZ1bjiw3DkS3MvC3C04ylXp4K4b3v43JwTQf4lH1r+tAYChY0Uol6/qff/4Q+euSv/TS5z/t7+v648/8X67//5ePzuuPf//c4AewGNyfCnfAavCjFR6Ab4NHr/AE3LzmWeE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9rLTRhKefUzpNH014+uc8naaRPqnFupVOmvD0zyYr5jur7gPMqtWdlAqzaFOd/k+SBrNmE51+Qmswu8+zI42XYL6zSE6/RbVPOlirOP0Rx3xnEZz+qU37ZIK1s20MjdknC2z7um7Ojl1u+rmiwwK4s50531kEpx9XO3wDtkcTYQ81wDYcmF5fc76zar4fdJwc/LPsGFybDprqm3YLPfQHlBjo9Y/oor9kHdhspY0m/FCJ0kd/RplwXWmkv2fll0XppI95pvM55jyr7vS/QDKYVfs1Rrpax6RnVX2AWbO/bU2vUDHrWTWn3w8bnLpvl5z+cUr7pIOVr+sOsF4w1p1grd50C4VhzyI3/a+dvLoLsPXcgyJydux6D22Rs2MXnHuf055F8QlugK3hHjgtdC+yY4E++Octx82jg54dk2vTQ8+Ozi8KXfTsaFCptNGz44Y1Sh89O9imSiM9O9ioSic9O+Ja5sbUZ9WdRBrMqj07YjraYBbt2cGVWbNnR/SIwew+z464OzA4uq9IPlTRwXrrtcoOsFZwPFvYJxPsjdawTxZYP3eATdlR5KZ/od9hAWwtJ9jilB1FcPrHURy+Afu54wHcAPu5gyvTvRgApcKDf37uuEDTwcgOdLPQQ8+OxbXpomfHhI1KGz07OqxR+ujZMUjTSM+OOKU4TSdNeLOJavX/P/ahbLPSTrIBs2qT3ezHrwGzaFPdBCuzZs8Oe8AJmN3n2fG/u9d//ws=",
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText(base64Str, BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Utc = _t, Ept = _t, Value = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Utc", type datetime}, {"Ept", type datetime}, {"Value", Int64.Type}})
in
#"Changed Type"
If I drop that same code into grazitti_sapna's example, I get this:
which would be fine, except for that blip on Nov 2nd:
You said, "Please show the expected outcome based on the sample data you provided.". It's hard to do that because if I knew how to do that I wouldn't be here. But I'll approximate it for you:
I achieved this simply by adding 30 minutes to the second 01:00 hour such that my raw data looked like this:
Maybe that's the solution. I'll have to adjust my SQL query to do that, but it's really a hack job and not "technically" correct. It boggles my mind that it never occurred to the devs that a user might want to chart a sub-daily timeseries chart with X-Axis labels in a timezone that includes a duplicate hour in the fall time change.
- grazitti_sapna5 months ago
Super User
Hi mjc123,
It's a bit clear about the requirement, I've altered the solution and created a .pbix.
Kindly see the attached
- mjc1235 months agoRegular Visitor
Hi grazitti_sapna,
I'm not sure if your version of Power BI is working a little bit differently than mine, but the chart in your latest file looks very similar to what I had taken a screenshot of in my previous post. i.e:It's the X-Axis labels that are the problem:
My ideal solution would be something like this (with or without the TZ indicator):
I realize I can do it by setting the axis to "Categorical", and that would work for small timescales like the above - but it breaks when trying to display, for example, an entire month (or more) of hourly data -- unless there's a setting somewhere to hide some of the category labels.
I can see you added an "EPT Display" column in your data, and I follow the math but for some reason it isn't evaluating properly for me:It does work if I add a helper column... not sure why it isn't evaluating properly without it:
But either way, thsoe "EPT Display" values don't end up showing up in the X-Axis labels, only in the tooltips:
as noted previously, I can get exactly what I want by changing it to categorical:but again, that's only good with a small data set. if I use the full month's data, I get this:
labels are correct, but now there's a scroll bar and that's not what I'm looking for.
I think that what I'm looking for simply isn't possible with the standard line chart visualization. I'll have to do a work-around like what I noted in my previous post, by adding 30 minutes to the duplicate hour or something like that.
- Anonymous5 months agoNot applicable
Hi mjc123 ,
There are potentially two workarounds in your scenario, You can address this by creating a new calculated column that explicitly handles the duplicate hour scenario instead of letting Power BI aggregate it implicitly. The idea is to build a column that detects when the same Ept timestamp appears more than once (like the repeated 01:00 AM during DST change) and slightly differentiates or tags those rows so they are treated as unique points on the axis. For example, you can use DAX to count occurrences of each timestamp and append a sequence or offset to the duplicate instances, which is potentially being used by you currently if I am not wrong. Another workaround is, you can handle this at the measure level by creating a DAX measure that intentionally ignores one of the duplicate timestamps so the visual doesn’t aggregate both values. The idea is to rank rows for each repeated Ept value (using a stable column like Utc), and then return the value only for the first occurrence while blanking out the rest. This way, the visual plots a single point for that hour without summing duplicates in Power BI.
I hope this information helps. Please do let us know if you have any further queries.
Thank you