Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a visualization below (Advanced Line Chart (Pro)) and I would like to have prettier labels on the x-axis: just dates (without time) and not necessarily every date.
I tried changing the type of x-axis from Auto to Date, but I got an empty visualization with dates in year 2000, even though I have data from April 2023.
Data for visual:
Relevant data looks like this (DateTime has type "Date/time", SimulationID "Whole number", Actual and Forecast "Decimal number"):
DateTime | SimulationID | Actual | Forecast |
30/04/2023 00:00 | 10861 | 16634.83 | 15961.49 |
30/04/2023 00:00 | 11045 | 16634.83 | 15839.35 |
30/04/2023 01:00 | 10861 | 15870.4 | 15163.19 |
30/04/2023 01:00 | 11045 | 15870.4 | 15043.59 |
30/04/2023 02:00 | 10861 | 15421.92 | 14531.76 |
30/04/2023 02:00 | 11045 | 15421.92 | 14405.2 |
30/04/2023 03:00 | 10861 | 14843.06 | 14003.39 |
30/04/2023 03:00 | 11045 | 14843.06 | 13885.02 |
30/04/2023 04:00 | 10861 | 14510.63 | 13492.57 |
30/04/2023 04:00 | 11045 | 14510.63 | 13383.25 |
30/04/2023 05:00 | 10861 | 14543.72 | 12737.51 |
30/04/2023 05:00 | 11045 | 14543.72 | 12654.43 |
30/04/2023 06:00 | 10861 | 14735.5 | 12751.7 |
30/04/2023 06:00 | 11045 | 14735.5 | 12594.7 |
30/04/2023 07:00 | 10861 | 15345.42 | 13805.14 |
30/04/2023 07:00 | 11045 | 15345.42 | 13476.23 |
I would really appreciate any help.
Solved! Go to Solution.
None of the suggested methods produced the result I wanted. So I made a workaround and saved the data in another way:
Then I used basic "Line chart" visualization to display the data.
None of the suggested methods produced the result I wanted. So I made a workaround and saved the data in another way:
Then I used basic "Line chart" visualization to display the data.
Try this:
In the report, select your column that corresponds to your date.
then, in "Column tools", change de "format type" as you prefer.
Do you need the timestamp date? You can either convert this to a date in Power Query or duplicate it in a new column and convert to date. It could be that you will need to convert it to date/time first before date.
If you have Auto/Date Time turned on, it will create a Hierarchy for you. You can then add Year, QTR, Month or Day to the visual
Thank you for your reply, with this I managed to make a graph on a daily granularity (where I have a column only with dates), which I also need.
But I would also need to have it on hourly granulation. If I try the same for hourly granularity, I get the error bellow:
Using the Timestamp column, Go to add column tab and Extract text after delimiter. The delimiter will be the a empty space. Just click on the keyboard once.
When the new column is created, in the Transform tab, click on extract first characters and choose 5. This will leave you with the time. Convert the column to time. You can then add this to the Matrix as a hierarchy
I tried using your method and used hierarchy of Date and Time:
And I get even longer x-axis labels, also the dates aren't correct anymore:
Previous version:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |