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
Anonymous
Not applicable

adding current time

 
1 ACCEPTED SOLUTION

Hi @Anonymous 

I can reproduce your problem.

To slove this, create a measure to show my local time

now = UTCNOW()+8/24

(my timezone is UTC+8)

Capture8.JPG

 

Then publish to Service, it shows correctly.

Capture9.JPG

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

If you want to identify which invoice date is equal to the current datetime of your local time, you could create a measure

Measure =
VAR DATETIME =
    FORMAT ( MAX ( [invoice date] ), "mm/dd/yyyy hh:mm" )
VAR _now =
    FORMAT ( NOW (), "mm/dd/yyyy hh:mm" )
RETURN
    IF ( DATETIME = _now, 1,0)

Capture6.JPG

If you want to display the current datetime in a card visual, please create a measure

Measure 2 = NOW()

Add it in the card visual, or use format function to format it to get expected format.

 

 

Best Regards
Maggie

 

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

Anonymous
Not applicable

Hi thank you so much for your help, I do seems to have a problem in power BI it shows the current date & time correctly now. but when i published it and live it it show different timings already. 

here's the sample: 
below is the correct timing in BI:

1213.JPG

but when i published it to live its different timing:

333.JPG

 

wanted the outcome to be the same current timing. How do i do it? Thank you so much!

Hi @Anonymous 

I can reproduce your problem.

To slove this, create a measure to show my local time

now = UTCNOW()+8/24

(my timezone is UTC+8)

Capture8.JPG

 

Then publish to Service, it shows correctly.

Capture9.JPG

Best Regards
Maggie

 

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

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

Please see the below Examples.

Measure = 
VAR _date_time = FORMAT( NOW(), "mm/dd/yyyy hh:mm:ss" ) -- format returns text 
VAR _time = FORMAT( NOW(), "mm/dd/yyyy hh:mm:ss" ) -- format returns text
VAR _date =  FORMAT( NOW(), "mm/dd/yyyy" ) -- format returns text
VAR _t = NOW() -- date time as original format 
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

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.

Top Solution Authors
Top Kudoed Authors