Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
lasmithfla
Helper I
Helper I

Help with calculation

Is it possible to do this same type of calculation in powerbi that I did in excel?

Basically I have an alternate count I'm using but it's based on what the value of the field is.

 

=IF(AND(ISNUMBER(SEARCH("Director*",C455)),F455="Task"),1,
IF(AND(ISNUMBER(SEARCH("Director*",C455)),F455="Collaborative"),2,
IF(AND(ISNUMBER(SEARCH("Partner*",C455)),F455="Task"),1,
IF(AND(ISNUMBER(SEARCH("PARTNER*",C455)),F455="Collaborative"),3,
IF(AND(C455="Project Room",F455="Collaborative"),0.8,
IF(B455="Group",0.8,
IF(E455="Ancillary",1,1)))))))

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@lasmithfla , Something like this

 

IF(AND(SEARCH("Director",[Column1],,0)>0,[Column2]="Task"),1,
IF(AND(SEARCH("Director",[Column1],,0)>0,[Column2]="Collaborative"),2,
IF(AND(SEARCH("Partner",[Column1],,0)>0,[Column2]="Task"),1,
IF(AND(SEARCH("PARTNER",[Column1],,0)>0,[Column2]="Collaborative"),3,
IF(AND([Column1]="Project Room",[Column2]="Collaborative"),0.8,
IF([Column4]="Group",0.8,
IF([Column5]="Ancillary",1,1)))))))

 

 

Better to use Switch : https://www.youtube.com/watch?v=gelJWktlR80

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@lasmithfla , Something like this

 

IF(AND(SEARCH("Director",[Column1],,0)>0,[Column2]="Task"),1,
IF(AND(SEARCH("Director",[Column1],,0)>0,[Column2]="Collaborative"),2,
IF(AND(SEARCH("Partner",[Column1],,0)>0,[Column2]="Task"),1,
IF(AND(SEARCH("PARTNER",[Column1],,0)>0,[Column2]="Collaborative"),3,
IF(AND([Column1]="Project Room",[Column2]="Collaborative"),0.8,
IF([Column4]="Group",0.8,
IF([Column5]="Ancillary",1,1)))))))

 

 

Better to use Switch : https://www.youtube.com/watch?v=gelJWktlR80

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors