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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Stoo48
Frequent Visitor

Slicer - Date and Time

Struggling with a slicer issue, my data has a date and time stamp in the format "mm/dd/yyyy hh:mm AM" in my query editor, have have split the column to "mm/dd/yyyy" and "hh:mm AM" , so far so good. The data types are defined as "date" and "time"

 

In my report I have applied a date slicer which works perfectly, however my time slicer returns a date format in mm/dd/yyyy as opposed to hh:mm AM, so despite the data being collected and time stamped in the last 72 hours, the time slice is showing 12/30/1899........

 

Any ideas would be gratefully received.

 

Thanks in advance

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@Stoo48You know I never switched the Slicer in my testing from List to any of the Before, Between and After Options!

 

It seems when you place a TIME column in the Slicer you can only use the List or Dropdown Options

 

I believe the others are only meant to be used with DATES

https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-october-feature-summary/preview/#dateSlice...

 

So there's not really an issue with the Data Type and Format!

 

>>> The issue seems to be with Slicer's  Before, Between and After options not working with TIME Columns! <<<

 

Checkout this blog by @heathernicole @dbadmin

http://community.powerbi.com/t5/Community-Blog/Advanced-Time-Line-Slicer-Sorting-data-by-shifts-up-t...

She discussed the Advanced Time Slicer

 

Good Luck! Smiley Happy

Sorry that's probably not the answer you were we looking for.

You can report this as an ISSUE here

http://community.powerbi.com/t5/Issues/idb-p/Issues

View solution in original post

13 REPLIES 13
pade
Advocate III
Advocate III

@Stoo48This is possible, but not with the on-canvas filters.

Using the Visual Level Filter, page Level Filter and/or Report Level Filters to the right of the canvas you can get this to work. Don't understand though why not implemented directly in the visual filters.

And as the Visual Level Filter are not visable when the report is published, and at the same time as the visual Level Filter is the only filter that accepts a measure, you will need to materialize the date and time combination in a column before beeing able to filter on the date and time combination

Sean
Community Champion
Community Champion

Check in the Modeling Tab (not in the Query Editor since you've already set it there)

 

What is the DATA TYPE and FORMAT set in the Modeling tab?

Stoo48
Frequent Visitor

Sean

 

Just checked, as the Query Editor, they are both showing correct TYPE and FORMAT in the modelling tab as I described above

 

 

 

 

Sean
Community Champion
Community Champion

When you Import that column in the Query Editor (the original Date/Time column before you split it)

 

Does it default to Date/Time or Text?

 

Inside the column are the numbers left justified or right justified when you first import it?

 

And same for the 2 columns that you split the original into

 

Do they default to their appropriate Data Type in the Query Editor?

OR

Do you have to manually set the Data Types?

 

EDIT: Are you running the latest release?

https://www.microsoft.com/en-us/download/details.aspx?id=45331

Stoo48
Frequent Visitor

Post Split.PNG

 

Columns, post split above^^^

Columns, pre split below

 

Pre Split.PNG

 

Regarding latest version, I am 1 release behind.........

 

 

Sean
Community Champion
Community Champion

How do you split the original column?

 

select the original Column

Go to the Add Column tab => Date button => select Date Only

and then again same original column => Time button => Time Only

 

DateTime Column.png

 

I hope this resolves it! Smiley Happy

 

EDIT: I can't duplicate this but I've had issues with not being able to format dates... (but not with Slicers)

https://ideas.powerbi.com/forums/360879-issues/suggestions/15157260-date-field-used-as-map-legend-sh...

the above has been fixed

http://community.powerbi.com/t5/Issues/Nov-2016-Update-Colors-of-the-Map-Legend-no-longer-match-what...

this is still not

http://community.powerbi.com/t5/Desktop/Facet-Key-Custom-Visual/td-p/80087

and the Facet Key Custom Visual STILL does NOT work woith dates Smiley Sad

Stoo48
Frequent Visitor

I used the split column function in the query editor, will try your method too

 

Split column.PNG

Stoo48
Frequent Visitor

Apologies for the delay in feeding back, your suggestion on how to split the columns worked well, however the time slicer still shows up as dates from a century ago..........

 

Input:

Input.PNG

 

Output:

Output.PNG

 

Any thoughts and suggestions gratefully received...........

Sean
Community Champion
Community Champion

@Stoo48  Can you duplicate the issue in a sample file and share the file? (via link to drop box or one drive)

Stoo48
Frequent Visitor

@Sean I'll give it a go after lunch..........

Stoo48
Frequent Visitor

@Sean PM Sent

Sean
Community Champion
Community Champion

@Stoo48You know I never switched the Slicer in my testing from List to any of the Before, Between and After Options!

 

It seems when you place a TIME column in the Slicer you can only use the List or Dropdown Options

 

I believe the others are only meant to be used with DATES

https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-october-feature-summary/preview/#dateSlice...

 

So there's not really an issue with the Data Type and Format!

 

>>> The issue seems to be with Slicer's  Before, Between and After options not working with TIME Columns! <<<

 

Checkout this blog by @heathernicole @dbadmin

http://community.powerbi.com/t5/Community-Blog/Advanced-Time-Line-Slicer-Sorting-data-by-shifts-up-t...

She discussed the Advanced Time Slicer

 

Good Luck! Smiley Happy

Sorry that's probably not the answer you were we looking for.

You can report this as an ISSUE here

http://community.powerbi.com/t5/Issues/idb-p/Issues

Stoo48
Frequent Visitor

@Sean, Many thanks for your input, I'll drop a note to the issues board.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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