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
manish_tripathi
Frequent Visitor

Add a conditional Column with two conditions

Hi I am a power BI beginner, I want to create a new conditional column in table below so that contracttype "Contract" with days as 1 change to "Per Diem", while rest all remain the same?

 

Input:

ContractType Days

Per Diem5
Contract1
Contract5
Contract4
Contract7
Per Diem1
Per Diem2
Per Diem3
Per Diem4
Contract1
Contract1
Permanent30

 

Expected Output:

 

ContractType Days New Type

Per Diem5Per Diem
Contract1Per Diem
Contract5Contract
Contract4Contract
Contract7Contract
Per Diem1Per Diem
Per Diem2Per Diem
Per Diem3Per Diem
Per Diem4Per Diem
Contract1Per Diem
Contract1Per Diem
Permanent30Permanent
1 ACCEPTED SOLUTION
Shaurya
Memorable Member
Memorable Member

Hi @manish_tripathi,

 

You can use:

 

New Type = IF('Table'[Contract Type]="Contract" && 'Table'[Days]=1, "Per Diem", 'Table'[Contract Type])

 

Works for you? Mark this post as a solution if it does!
Check out this post of mine: Forecast Period - Previous Forecasts 
Spare some time to read: How to Export Telemetry Data from Azure IoT Central into Power BI 

View solution in original post

2 REPLIES 2
Shaurya
Memorable Member
Memorable Member

Hi @manish_tripathi,

 

You can use:

 

New Type = IF('Table'[Contract Type]="Contract" && 'Table'[Days]=1, "Per Diem", 'Table'[Contract Type])

 

Works for you? Mark this post as a solution if it does!
Check out this post of mine: Forecast Period - Previous Forecasts 
Spare some time to read: How to Export Telemetry Data from Azure IoT Central into Power BI 

Thank you

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.

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
Top Kudoed Authors