Hi*
I'm new to power query. I'm trying to create a custom column which says, 'if text in column A contains the word 'monthly' then divide value in column B by (5 * 4)
How would that look in a custom column.
Hi*
I'm new to power query. I'm trying to create a custom column which says, 'if text in column A contains the word 'monthly' then divide value in column B by (5 * 4)
How would that look in a custom column.
Last edited by chris1089; 03-14-2023 at 11:28 AM.
Here's how you can create a custom column that checks if text in column A contains the word 'monthly' and then divides the value in column B by (5 * 4):
In the Power Query Editor, select the table containing columns A and B.
Click on the 'Add Column' tab and select 'Custom Column'.
In the 'Custom Column' dialog box, type in the following formula:
= if Text.Contains([A], "monthly") then [B] / (5*4) else [B]
This formula checks if the text in column A contains the word 'monthly'. If it does, it divides the value in column B by (5*4). If it doesn't, it simply returns the value in column B.
Give a name to the new column in the 'New column name' field.
Click 'OK' to create the new column.
That's it! You should now have a new column with the results you were looking for. If you have any further questions, feel free to ask!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks