Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
niccolo_guazz
Regular Visitor

Plot dataset with x-axis dates

Dear all.

I am working with a dataset with which I am creating a dashboard. My dataset is very simple, a first column of [yyyy-mm-dd-hh-mm], and a second column with many values.

I read in many threads and forum about the difficulty to plot dates on x-axis (including hours and minuts).

As reference I am using this dashboard built in PowerBi https://www.terna.it/it/sistema-elettrico/transparency-report/total-load .(Public data of Italian electric energy generation)

This is exactly the outcome I would like to obtain, but by now I cannot display the hours and minuts. I used their data to reproduce the dashboard.

I tried to switch from a "dates" x-axis to a "text" x-axis, but the result is not the same, and furthermore the plot does not occupy the whole page but I have to move to the right.

niccolo_guazz_0-1670078623424.png

I really cannot understand how the linked dashboard was built.

Any idea?

Thanks.

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @niccolo_guazz ,

 

To get this visualization working properly you need to extract the time to another column making your table look like this:

MFelix_0-1670081862331.png

 

Then use the Time column on your axis and filter for the last relative day

MFelix_1-1670081896304.png

This should give expected result.

 

If you want to keep the datetime stamp when you donwload it you need to do a different option:

  • Duplicate the date column
  • Format with hours format hh:mm
  • Use this column on your axis
  • Filter for the relative date

Has you can see below both charts are the same:

MFelix_2-1670082056436.png

For the more than one day option they only used the date column with the format of date.

 

See attach PBIX file.

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

The last field of the values is the tooltip you can add more fields to the tooltip, in this case add the original date column.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
niccolo_guazz
Regular Visitor

 Thanks @MFelix .

Do you know how I could show wven the day in the black-box below (in addition to the hour)?

And in general do you know how to modify the aspect of the box?

thank you.

niccolo_guazz_0-1670085972539.png

 

The last field of the values is the tooltip you can add more fields to the tooltip, in this case add the original date column.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @niccolo_guazz ,

 

To get this visualization working properly you need to extract the time to another column making your table look like this:

MFelix_0-1670081862331.png

 

Then use the Time column on your axis and filter for the last relative day

MFelix_1-1670081896304.png

This should give expected result.

 

If you want to keep the datetime stamp when you donwload it you need to do a different option:

  • Duplicate the date column
  • Format with hours format hh:mm
  • Use this column on your axis
  • Filter for the relative date

Has you can see below both charts are the same:

MFelix_2-1670082056436.png

For the more than one day option they only used the date column with the format of date.

 

See attach PBIX file.

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.