Writing an IF statement in Power BI

When writing an IF statement in Power query yo have to look for the add columns section and the 'Conditional Column'

This will load a window where you can create a conditional statement like with Tableau or Excel. However it is more structured than either of those systems.

The window that loads looks like this

This allows you to create your IF statement. an example conditional Column is below.

This would then give the following output

Its Also important to make sure that the conditional column is formatted to the data type that it contains, so in this example it would be a text, This would be achieved by left clicking on the "ABC123" on the top left hand side of the column and selecting 'text'

Author:
Myles Stevenson
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab