Forum Discussion
Calculated function in Direct Query
I try to achieved this calculated column and work fine in Import Mode but In Direct Query it does not work for CALCULATE and REMOVEFILTERS. how could i possible to achieved it?
Test =
VAR CurrentDate = Workstation_HealthCheck[checked_at]
VAR CurrentIndex = Workstation_HealthCheck[id]
VAR PreviousDate =
CALCULATE (
MAX ( Workstation_HealthCheck[checked_at] ),
Workstation_HealthCheck[id] = CurrentIndex - 2,
REMOVEFILTERS ( Workstation_HealthCheck )
)
VAR TimeDifference =
DATEDIFF ( PreviousDate, CurrentDate, HOUR )
RETURN
IF (
ISBLANK ( PreviousDate ),
"UP", -- Or "First Check-in"
IF ( TimeDifference > 4, "DOWN", "UP" )
)
1 Reply
- v-sathmakuri
Community Support
Hi yannaingoo ,
This is a duplicate thread. There is another thread with same question hence turning off the replies in this thread.
Calculated function in Direct Query | Microsoft Fabric Community
Thanks!!