Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Lot Disposition Duration 2 = IF('board-Query'[Lot Current Status] = "Approved for Processing", 'board-Query'[Lot Disposition Duration], IF('board-Query'[Lot Current Status] = "Approved", 'board-Query'[Lot Disposition Duration], IF('board-Query'[Lot Current Status] = "Quarantine", 'board-Query'[Lot Disposition Duration], IF('board-Query'[Lot Current Status] = "Reject", 'board-Query'[Lot Disposition Duration], IF('board-Query'[Lot Current Status] = "Conditional Release", 'board-Query'[Lot Disposition Duration], "" )))))
Hi again everyone!
I was wondering if someone could tell me why I can't do this/how to correctly write this. the error message says "Expressions that yield variant data-type cannot be used to define calculated columns."
But I feel like I have done something like this before, I just dont know how! The Lot Current Status column has 10 different statuses, but I only want to look at the ones listed above--and if that condition is met, paste the related value from another column (Lot Distribution Duration)
Thanks!!!
Solved! Go to Solution.
try this, with IN clause, it makes your code a lot cleaner and shorter
Lot Disposition Duration 2 =
IF (
'board-Query'[Lot Current Status]
IN {
"Approved for Processing",
"Approved",
"Quarantine",
"Reject",
"Conditional Release"
},
'board-Query'[Lot Disposition Duration],
""
)
You can also modify your measure like below:
Lot Disposition Duration 2 = IF ( 'board-Query'[Lot Current Status] = "Approved for Processing" || 'board-Query'[Lot Current Status] = "Approved" || 'board-Query'[Lot Current Status] = "Quarantine" || 'board-Query'[Lot Current Status] = "Reject" || 'board-Query'[Lot Current Status] = "Conditional Release", 'board-Query'[Lot Disposition Duration] )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried this but now its just returning true/false, which i guess is one step closer/better than an error! but still not what i want
Lot Disposition Duration 2 = IF('board-Query'[Lot Current Status] = "Approved for Processing", 'board-Query'[Lot Disposition Duration] || IF('board-Query'[Lot Current Status] = "Approved", 'board-Query'[Lot Disposition Duration] || IF('board-Query'[Lot Current Status] = "Quarantine", 'board-Query'[Lot Disposition Duration] || IF('board-Query'[Lot Current Status] = "Reject", 'board-Query'[Lot Disposition Duration] || IF('board-Query'[Lot Current Status] = "Conditional Release", 'board-Query'[Lot Disposition Duration], "" )))))
You can also modify your measure like below:
Lot Disposition Duration 2 = IF ( 'board-Query'[Lot Current Status] = "Approved for Processing" || 'board-Query'[Lot Current Status] = "Approved" || 'board-Query'[Lot Current Status] = "Quarantine" || 'board-Query'[Lot Current Status] = "Reject" || 'board-Query'[Lot Current Status] = "Conditional Release", 'board-Query'[Lot Disposition Duration] )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
try this, with IN clause, it makes your code a lot cleaner and shorter
Lot Disposition Duration 2 =
IF (
'board-Query'[Lot Current Status]
IN {
"Approved for Processing",
"Approved",
"Quarantine",
"Reject",
"Conditional Release"
},
'board-Query'[Lot Disposition Duration],
""
)