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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Use DAX measure to build IF ELSE function with column

Dear All,

 

I want to build a new measure (could also be a new column if this fits better), based on a IF ELSE function. 

Below you will see a small table, where one of the columns will be the condition in formula. 

 

Power_BI_Adapt_0-1655880642625.png

The idea is the following:

 

I am looking for a formula containing the following:

 

IF column 'Advies Goederenklasse' = 'Parellel', then the outcome need to be 10%

IF  column 'Advies Goederenklasse' = 'Special', then the outcome need to be 5%

ELSE the outcome need to be 0

 

Thanks for any assistance in advance!

 

Kind regards,

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Anonymous 

you can use

SWITCH (

TRUE ( ),

[Advies Goederenklasse] = "Parellel", 0.1,

[Advies Goederenklasse]= "Special" , 0.5,

0

)

View solution in original post

@Anonymous 

Make sure it is a column not a measure and double check the spelling 

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Anonymous 

you can use

SWITCH (

TRUE ( ),

[Advies Goederenklasse] = "Parellel", 0.1,

[Advies Goederenklasse]= "Special" , 0.5,

0

)

Anonymous
Not applicable

Thanks for sharing.

 

Unfortunaltely it doesnt work with me. The column [Advies Goederenklasse] hasnt been recognised as a column name, even when I define the table name in front of it.

@Anonymous 

Make sure it is a column not a measure and double check the spelling 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors