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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MOOREJEFFREY
Frequent Visitor

Calculated column will not return values when updated via scheduled or manual refresh

Calculated column works fine in desktop however if the data set is scheduled refresh then the error below is displayed:

MOOREJEFFREY_0-1658956952467.png

WOrks fine when published from desktop. Problem is only after scheduled or manual refresh.

 

Calculated column:

duration =
VAR NextIndex = [Index] + 1
VAR NameNowArea = [Area]
VAR NameNowLine = [Line]
VAR NameNowWorkCenter = [Work Center]


VAR timest = CALCULATETABLE(
            VALUES ( 'CX4X Line Machine States'[_time] ),
            FILTER ( ALL ( 'CX4X Line Machine States' ), [Index] = NextIndex )
        )

RETURN IF(NOT(timest), (NOW() - [_time]) * 24.0 * 60.0,
    (timest - [_time]) * 24.0 * 60.0)
1 ACCEPTED SOLUTION

Hello GilbertQ,

 Thank you very much for the suggestion. I removed all references to NOW() in the query and have the same result. Have another solution for this problem however it should be lilely flagged as an instance where a calucation runs on the Vertipack engine but not in Analysis services. Thank you again for the feedback.

 

Best Regards

Jeff

View solution in original post

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @MOOREJEFFREY 

 

I think this has to do with the function "NOW()" because all the PBI Service servers are in UTC. So it would appear that using NOW() is probably returning the wrong value which is causing it to fail.

 

It will work on PBI Desktop because this is in your current timezone, so now is accurate.

 

What you would have to do, is to take NOW() and add the hours for your timezone. If for example you are in GMT + 8 you would need to create a variable as shown below.

 

VAR CurrentDateTime = NOW() + TIME(8,0,0)




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

Proud to be a Super User!







Power BI Blog

Hello GilbertQ,

 Thank you very much for the suggestion. I removed all references to NOW() in the query and have the same result. Have another solution for this problem however it should be lilely flagged as an instance where a calucation runs on the Vertipack engine but not in Analysis services. Thank you again for the feedback.

 

Best Regards

Jeff

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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