Forum Discussion
DDesmond
3 years agoNew Member
Create customer column based on boolean values & dates of other columns
Hi, I'm trying to create a custom column for inventory purposes. There are two relevant columns I need to include in the formula:
- Product EUD (End Use Date) - indicates the date that a product's available resources (e.g. amount of liquid in a bottle) depleted
- Out of Possession - (boolean) indicates that the product is no longer available for use (e.g. if it is depleted)
The data I'm bringing into PQ is already populated with some of this data, but I want the custom column to populate via a check on the existing data. The logic would be something like this:
- If Out_of_Possession is not null
- use existing value
- Else
- if Product_EUD is null
- FALSE
- else
- TRUE
- if Product_EUD is null
How can I create a custom column formula to capture this logic? I'm having some difficulty composing it with the M language.
- Anonymous3 years ago
Hi DDesmond
You already have it
if [Out of Possession] <> null then [Out of Possession] else if [Product_EUD] = null then false else true
1 Reply
- AnonymousNot applicable
Hi DDesmond
You already have it
if [Out of Possession] <> null then [Out of Possession] else if [Product_EUD] = null then false else true