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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

New column based on criteria

Hi.
I have this table (a lot bigger, but just simplifying it), and a want to create a new column that is called "New provision fee %".
The provisionfee for order number O1 and O2 should really be 8, and the rest should be 10 (unchanged). Could somone help me with a formula for this column? Or is it possible to go and edit the data table precentages manually in some way?

NorthernKarsten_0-1612519608817.png

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , A new column like

 

if([order number] in {"O1", "O2"}, 8,10)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

timg
Solution Sage
Solution Sage

Hi,

If you want to do this in Dax you could use the following formula:

 

NewProvisionPerc =
SWITCH (
    TRUE (),
    TestTable[Order number] IN { "O1", "O2" }, 8,
    TestTable[Provision%]
)

 

1.PNG

However, if possible you might want to solve this in the data source, or in Power query, since the DAX method will add a new column to your model next to the old one (unnecessary bulk). Via Power Query you could solve it with a conditional column. Once you have this new column the old one can be removed:

2.PNG

Hope that helps!

Regards,

Tim





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
timg
Solution Sage
Solution Sage

Hi,

If you want to do this in Dax you could use the following formula:

 

NewProvisionPerc =
SWITCH (
    TRUE (),
    TestTable[Order number] IN { "O1", "O2" }, 8,
    TestTable[Provision%]
)

 

1.PNG

However, if possible you might want to solve this in the data source, or in Power query, since the DAX method will add a new column to your model next to the old one (unnecessary bulk). Via Power Query you could solve it with a conditional column. Once you have this new column the old one can be removed:

2.PNG

Hope that helps!

Regards,

Tim





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous , A new column like

 

if([order number] in {"O1", "O2"}, 8,10)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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