cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Bibeksharma Frequent Visitor
Frequent Visitor

IF function

Hi,

 

I want to create a new column to show for each office its use type, following these rules:

 

Rule                                                         Use typeIf

any of the 3 Use columns is office        Office, etc

Otherwise                                               Other



Below is the table,

CityUse1Use2Use3
Dubaiofficeresidentialhotel
Shanghaihotelofficenull
Meccaotherhotelnull
New York Cityofficenullnull
Guangzhouhotelresidentialoffice
Taipeiofficenullnull
Shanghaihotelofficenull
Hong Konghotelofficenull
Kuala Lumpurofficenullnull
Kuala Lumpurofficenullnull
Nanjinghotelofficenull



Thank you.




1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: IF function

Hi @Bibeksharma

Please look at my test

Modeling->New column, paste your formula

1.png

 

I'm afraid you were using edit queries.

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
Bibeksharma Frequent Visitor
Frequent Visitor

Re: IF function

I wrote the formula shown below but I get an error "Token Comma expected"

IF([Use1] = "office" || [Use2] = "office" || [Use3] = "office", "Office, etc", "Other") 

Community Support Team
Community Support Team

Re: IF function

Hi @Bibeksharma

Please look at my test

Modeling->New column, paste your formula

1.png

 

I'm afraid you were using edit queries.

 

Best Regards

Maggie

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 218 members 2,273 guests
Please welcome our newest community members: