Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I have a spreadsheet where I use the formula =IF(S2="Lead Functional",R2*118,IF(S2="Lead Technical",R2*118,IF(S2="Analyst",R2*67.5,IF(S2="Technical",R2*112.5,IF(S2="Functional",R2*112.5,0)))))
It looks at what is in S2, then depending on the content it multiples R2 by a specific value. What is is doing is looking to see what the role type is (S2), then multiplying the hourly rate by the number of hours (R2).
I want to create a column (assume custom column?) but not sure how to do it. The columns I would use are Role, Hours and then I want a column called Sales Price with the multiplication.
Can anyone advise please?
Solved! Go to Solution.
Hi
Custom column formula =
= [Hours] *
Record.FieldOrDefault(
[Lead Functional = 118, Lead Technical = 118, Analyst = 67.5, Technical = 112.5, Functional = 112.5],
[Role],
0)
Stéphane
Hi
Custom column formula =
= [Hours] *
Record.FieldOrDefault(
[Lead Functional = 118, Lead Technical = 118, Analyst = 67.5, Technical = 112.5, Functional = 112.5],
[Role],
0)
Stéphane
Many thanks, that works a treat.
Thanks, but I just adapted AlienSx's solution
Stéphane
rec =
[Lead Functional = 118,
Lead Technical = 118,
Analyst = 67.5,
Technical = 112.5,
Functional = 112.5],
price = Table.AddColumn(your_table, "Sales Price", each [Hours] * Record.FieldOrDefault(rec, [Role], 0))
Many thanks for taking time to reply, you can probably tell I am a newbie to Power Query. Where would I go from here?
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 4 |