cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
DDesmond
New 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

How can I create a custom column formula to capture this logic? I'm having some difficulty composing it with the M language.

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @DDesmond 

 

You already have it

Vera_33_0-1662878362613.png

if [Out of Possession] <> null then [Out of Possession] 
else if [Product_EUD] = null then false 
else true

 

View solution in original post

1 REPLY 1
Vera_33
Resident Rockstar
Resident Rockstar

Hi @DDesmond 

 

You already have it

Vera_33_0-1662878362613.png

if [Out of Possession] <> null then [Out of Possession] 
else if [Product_EUD] = null then false 
else true

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors