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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
matka123499
Frequent Visitor

Power query formula

Hello,

 

I have set of data as in bellow. I would need to add in power query editor another colum which would be calculated according to condition. If ExpenseBasis_ID has "Percentage" in it then it will return the same value as we have in Amount1 column to column Amount2, however if there isn't "Percentage" in column ExpenseBasis_ID it would be using formula (Amount1 *12). Can you please help me with this? Thank you!

 

ExpenseBasis_IDAmount1Amount 2
Percentage2 
Amount 25 
Amount 16 
Percentage3 
Amount 42 
Percentage9 
1 ACCEPTED SOLUTION
tharunkumarRTK
Super User
Super User

@matka123499 

Create a conditional column in Power Query and use the below formula

 

tharunkumarRTK_0-1709717186816.png


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

View solution in original post

3 REPLIES 3
goncalogeraldes
Super User
Super User

Hi @matka123499 ,

 

I would only add to @tharunkumarRTK solution, in the formula box of the custom column in Power Query:

 

if Text.Contains( [ExpenseBasis_ID], "Percentage" ) then [Amount1] else [Amount1] * 12

 

This suggestion comes because you state that "If ExpenseBasis_ID has "Percentage" " so I would imagine that the ExpenseBasis column may sometimes have some other characters when its Percentage.

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

tharunkumarRTK
Super User
Super User

@matka123499 

Create a conditional column in Power Query and use the below formula

 

tharunkumarRTK_0-1709717186816.png


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

Thank you!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Kudoed Authors