Forum Discussion
syaifulefendi
3 years agoFrequent Visitor
ASK HELP - Getting Tolerable Shift from Date
Hi Kindly help me to get result on result column with Dax as shown below start time if <= 9AM , tolerable will be 9AM , beside this will be same as schedulle or Shift Start column T...
- 3 years ago
As a calculated column you could add it like this.
Tolerable Late (Result) = IF ( HOUR ( 'Table'[Shift Start] ) <= 9, DATEVALUE ( 'Table'[Shift Start] ) + TIME ( 9, 0, 0 ), 'Table'[Shift Start] )If you are looking for a measure it would be like this.
Tolerable Late (Result) Measure = VAR _ShiftStart = SELECTEDVALUE ( 'Table'[Shift Start] ) RETURN IF ( HASONEVALUE ( 'Table'[Shift Start] ), IF ( HOUR ( _ShiftStart ) <= 9, DATEVALUE ( _ShiftStart ) + TIME ( 9, 0, 0 ), _ShiftStart ), BLANK() ) - 3 years ago
Thanks brother
jdbuchanan71
3 years agoSuper User
As a calculated column you could add it like this.
Tolerable Late (Result) =
IF (
HOUR ( 'Table'[Shift Start] ) <= 9,
DATEVALUE ( 'Table'[Shift Start] ) + TIME ( 9, 0, 0 ),
'Table'[Shift Start]
)
If you are looking for a measure it would be like this.
Tolerable Late (Result) Measure =
VAR _ShiftStart = SELECTEDVALUE ( 'Table'[Shift Start] )
RETURN
IF ( HASONEVALUE ( 'Table'[Shift Start] ),
IF (
HOUR ( _ShiftStart ) <= 9,
DATEVALUE ( _ShiftStart ) + TIME ( 9, 0, 0 ),
_ShiftStart
),
BLANK()
)syaifulefendi
3 years agoFrequent Visitor
Thanks brother