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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
daytronxllc
Frequent Visitor

Multiple If Statement with 2 tables

Hi, 

 

Below is a half attempt of what I am trying to accomplish, I am looking to see if anyone can help.  

 

I have 2 tables and they are related like this based on the column:

 

InterimWorkingProject.InterimWorkingProjectIdent = ProjectCustomField.ProjectIdent

 

What we are a tax firm and need to look in a column that contains text like this: 2017 1040 or 2018 1041, I have made a conditional column in query editor and called is "Return" that looks for text and returns, 1040 or 1041 to scrub out any other text, so that is working fine.  What I need to do now is basically a big nested if statement.  I can't seem to call columns in a measure.  Can you help?

 

IF InterimWorkingProject.Return contains 1040 or 1041 or 990 or 1120H
&& ProjectCustomField.ProjectCustomFieldValue is '00000000-0000-0000-0000-000000000000' OR '1bee2293-a7bf-42f1-af4c-b2bc59283ec9'
then 120.00 

 

Else

 

IF InterimWorkingProject.Return contains 1120 or 1120S or 1065
&& ProjectCustomField.ProjectCustomFieldValue is '00000000-0000-0000-0000-000000000000' OR '1bee2293-a7bf-42f1-af4c-b2bc59283ec9' then 145.00

 

Else

 

IF InterimWorkingProject.Return contains 1120 or 1120S or 1065 or 1040 or 1041 or 990 or 1120H
&& ProjectCustomField.ProjectCustomFieldValue is '1ac0e098-75b9-4da5-aa29-85a970fbb3e4'
then "NC Staff"


Else

 

IF InterimWorkingProject.Return contains 1120 or 1120S or 1065 or 1040 or 1041 or 990 or 1120H
&& ProjectCustomField.ProjectCustomFieldValue is 'a213a32d-89f7-4272-bc5b-efa15a4b684f'
then "NC - Client Child"


Else

 

IF InterimWorkingProject.Return contains 1120 or 1120S or 1065 or 1040 or 1041 or 990 or 1120H
&& ProjectCustomField.ProjectCustomFieldValue is '5634fe00-679a-4021-8485-2bbe6684c65d'
then "NC - Staff Immediate"

2 REPLIES 2
Anonymous
Not applicable

If you want to use IF statement in a measure, you have to use a measure as its parameter. For your case, you can create a measure and call VALUES to get the value from InterimWorkingProject.Return. Then use it in your IF statement.

ok, I am following you, so i just made a new measure: returnvalue = Values(INTERIMWORKINGPROJECT[Return])

 

and then I went to create a new measure like this:

 

Charge = if([returnvalue] = "1120S", 120, 0) but i get an error when i add it to my table

 

error: 

 

 

couldn'tload.JPG

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.