Forum Discussion
DrewCarousel
6 years agoFrequent Visitor
Expressions that yield variant data-type cannot be used to define calculated columns
Dear Community, I have the below formula that is returning the above error - please can you help me get rid of the issue? I'm trying to achieve a column that gives me a date & time field. Fo...
- 6 years ago
Hi DrewCarousel ,
You could refer to the following DAX:
CalcSLA = IF ( 'Master Table'[Channel] = "IE Own Network", IF ( OR ( 'Master Table'[Parent Account] = "CUSTOMER A", 'Master Table'[Parent Account] = "CUSTOMER B" ), VALUE ( FORMAT ( 'Master Table'[Submitted], "General Number" ) ) + 0.729167, IF ( 'Master Table'[Parent Account] = "CUSTOMER C", VALUE ( FORMAT ( 'Master Table'[Submitted], "General Number" ) ) + 0.729167, VALUE ( FORMAT ( 'Master Table'[Submitted], "General Number" ) ) + 0.5 ) ), IF ( 'Master Table'[Channel] = "UK Own Network - NIGHT", VALUE ( FORMAT ( 'Master Table'[Submitted], "General Number" ) + FORMAT ( 'Master Table'[SLA Temp], "General Number" ) ), VALUE ( FORMAT ( 'Master Table'[SLA Temp], "General Number" ) ) ) )
v-eachen-msft
6 years agoCommunity Support
Hi DrewCarousel ,
You could refer to the following DAX:
CalcSLA =
IF (
'Master Table'[Channel] = "IE Own Network",
IF (
OR (
'Master Table'[Parent Account] = "CUSTOMER A",
'Master Table'[Parent Account] = "CUSTOMER B"
),
VALUE ( FORMAT ( 'Master Table'[Submitted], "General Number" ) ) + 0.729167,
IF (
'Master Table'[Parent Account] = "CUSTOMER C",
VALUE ( FORMAT ( 'Master Table'[Submitted], "General Number" ) ) + 0.729167,
VALUE ( FORMAT ( 'Master Table'[Submitted], "General Number" ) ) + 0.5
)
),
IF (
'Master Table'[Channel] = "UK Own Network - NIGHT",
VALUE (
FORMAT ( 'Master Table'[Submitted], "General Number" )
+ FORMAT ( 'Master Table'[SLA Temp], "General Number" )
),
VALUE ( FORMAT ( 'Master Table'[SLA Temp], "General Number" ) )
)
)