cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

2 REPLIES 2
Highlighted
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

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 267 members 2,934 guests
Please welcome our newest community members: