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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Ewelina
Frequent Visitor

Different time format on area chart axis and tooltip

Hello,

 

I have a problem with time format on area chart. On the x-axis, it is 24-hours time format, but when I put the cursor on the line, the tooltip shows 12-hours time format wihout AM/PM. 

Ewelina_0-1614252321756.png

 

I check other charts and there is the same problem if the chart doesn't have change format option inside (e.g. Power KPI 2.0.0 has this option, but it allows to show data from only one day and I need to show the data from longer period).

 

The data source of this visualisation is the the Power BI Data Source and there is the 24-hours format set for this column.

I use live connect mode and in this case I can't change the format in column settings and I don't have access to Power Query Editor. 
Ewelina_1-1614252486176.png

 

I want to have the same format on the axis and inside the chart (12-hours with AM/PM or 24-hours, but the same everywhere). 

 

Thank You for all ideas,

Ewelina

 

 

 

 

1 ACCEPTED SOLUTION

Hi, @Ewelina 

What is kind of visualization  you are using?

Affected by the format of the original date field (the format  the date field in the PowerBI dataset), the tooltip will still display the same format (the 12-hour time format without AM/PM).

Workarounds1:

Republish a new dataset to PowerBI service after changing the date format on powerBI Desktop.

 

Workarounds 2:

Create your own custom  tooltip (new measure using function 'format'

 

Measure1 = format(SELECTEDVALUE('Table'[Date]),"yyyy-mm-dd hh:nn:ss")
Measure 2 = format(SELECTEDVALUE('Table'[Date]),"mm/dd/yyyy hh:nn:ss AMPM")

 

100.png

 

default tooltip:

101.png

 

custom tooltip :

 

103.png

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

6 REPLIES 6
DataZoe
Employee
Employee

Hi @Ewelina, even in a direct query model, you should be able to click on the datetime on the right side of the screen (in the Fields pane). Then you should be able to pick a format that works for you.

DirectQueryDateFormat.png

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Hi @DataZoe,

 

I tried to change format this way, but it isn't possible.

 

Ewelina_0-1614321348681.png

 

Hi, @Ewelina 

I didn't find anything wrong on my side.

Please make sure you have changed the connection mode from  live connect mode to directquery mode before  you change the format .

95.png

97.png

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-easonf-msft,

it's my mistake, I use live connect mode, not directquery mode. 
I don't understand why the time format on x-axis is different than the one the tooltip shows.
Have You any ideas why is that and how to change it using live connection?

Best Regards,

Ewelina

Hi, @Ewelina 

What is kind of visualization  you are using?

Affected by the format of the original date field (the format  the date field in the PowerBI dataset), the tooltip will still display the same format (the 12-hour time format without AM/PM).

Workarounds1:

Republish a new dataset to PowerBI service after changing the date format on powerBI Desktop.

 

Workarounds 2:

Create your own custom  tooltip (new measure using function 'format'

 

Measure1 = format(SELECTEDVALUE('Table'[Date]),"yyyy-mm-dd hh:nn:ss")
Measure 2 = format(SELECTEDVALUE('Table'[Date]),"mm/dd/yyyy hh:nn:ss AMPM")

 

100.png

 

default tooltip:

101.png

 

custom tooltip :

 

103.png

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

@Ewelina If I am understanding correctly, it looks like it is a text datatype which is why it's not allowing you to change it. If it were a date datatype then it would be ok to change it. 

 

Another idea is to utilize it as a composite model. In this way you would create a new date table in DAX and then join it to your direct query table. In the new table you can format it however you please. 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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