Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Conditional Calculated Column

Hey everyone,

I need help with a calculated column.

I've got two tables. Table one contains the hours employees have worked (Aantal), which project they have worked for (Klantnum.), which role they have. (Personeel.Tarief Categorie)

LaZZaNoVa61_0-1655320025951.png

 

An employee is either an advisor or a coördinator.
Both have different hour rates. The rates differ per customer (Klantnum.)
These rates are present in second table.

LaZZaNoVa61_1-1655320114901.png

 

I want to add a calculated column to the first column which does the following:
If Klantnum. is not null:
If Personeel.Tarief Categorie = Adviseur, Aantal * Table2.Tarief adviseur
If Personeel.Tarief Categorie = Coördinator, Aantal * Table2. Tarief coordinator
If Klantnum. is null: 
Null

With kind regards,

Lazzanova


1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

@Anonymous - in Power Query, you can add a Custom Column using the following if syntax.

 

if [Klantnum] = null then null 
esle if [Personeel.Tarief Categorie] = "Adviseur" then [Aantal] * #"Tarief Adviser"
else [Aantal] * #"Tarief coordinator"

The rates need to be added Query

Tarief Adviser = let source #"Table2"{0}[Tarief adviseur]  in source 
Tarief coordinator = let source #"Table2"{0}[Tarief coordinator]  in source 

 

 

 

View solution in original post

1 REPLY 1
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

@Anonymous - in Power Query, you can add a Custom Column using the following if syntax.

 

if [Klantnum] = null then null 
esle if [Personeel.Tarief Categorie] = "Adviseur" then [Aantal] * #"Tarief Adviser"
else [Aantal] * #"Tarief coordinator"

The rates need to be added Query

Tarief Adviser = let source #"Table2"{0}[Tarief adviseur]  in source 
Tarief coordinator = let source #"Table2"{0}[Tarief coordinator]  in source 

 

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.