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

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.

Reply
Maureen
Helper III
Helper III

Start of Hour Showing Date on Card

 I have start of the hour as a variable that I tried to use as a drill-though variable.    But when I select 9:00AM on a graph and drill though to a card, it shows the time and a dummy date that I do not want.  My variable is set as  time variable.  Any suggestions on how I can make the card show time-only?

 

Maureen_0-1612704803817.png

Maureen_1-1612704851082.png

Maureen_2-1612704875053.png

 

 

 

 

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

In DAX, times also have that hidden data value (and Dates have a hidden time value of midnight).  You can wrap it in format to show your desired format (or choose a format in the ribbon).

 

TimeFormat = Format(MIN(Table[TimeColumn]), "hh:mm:ss AM/PM")
 
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
aj1973
Community Champion
Community Champion

Hi @Maureen 

One of the best parctices in Power BI is to *** Split date and time *** for better performance

https://powerbi.microsoft.com/en-us/blog/best-practice-rules-to-improve-your-models-performance/

 

I suggest you add a new column for Time and use it in your card

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

This column was already set up as  a "start of the hour" column from the query editor and shows as only a time variable, not date/time  Is it still necessary to split even though it shows as time only?

aj1973
Community Champion
Community Champion

I would say yes and try it if you prefer to see the exact time in your card.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

mahoneypat
Employee
Employee

In DAX, times also have that hidden data value (and Dates have a hidden time value of midnight).  You can wrap it in format to show your desired format (or choose a format in the ribbon).

 

TimeFormat = Format(MIN(Table[TimeColumn]), "hh:mm:ss AM/PM")
 
Pat
 




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.