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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors