Forum Discussion
Returning a value from a lookup value formula
I have 2 different files - they are connected in relationships by Account name but there may be multiple account names in the "Service 3 - Opps" file.
This is the column measure I have started:
Hi,
Try this
=if(isblank(LOOKUPVALUE('Service 3 - Contract Opps'[Account Name],'Service 3 - Contract Opps'[Account Name], 'Service 4 - Contract accts'[Account Name])),0,1)Hope this helps.
8 Replies
- ryan_mayu
Super User
try this
IF (ISBLANK(LOOKUPVALUE ('Service 3 - Contract Opps'[Account Name],'Service 4 - Contract accts'[Account Name], 'Service 4 - Contract accts'[Account Name])),0,1)ORIF (LOOKUPVALUE ('Service 3 - Contract Opps'[Account Name],'Service 4 - Contract accts'[Account Name], 'Service 4 - Contract accts'[Account Name])=“”,0,1))- amiller5
Helper II
I think it is more of an "IfError" expression because the corresponding lookup just may not be there, not necessarily blank. but when I try to input that type of formular I get an error "Expressions that yield vairant data-type cannot be used to define calculated columns."
Has an opportunity? =IFERROR (LOOKUPVALUE ('Service 3 - Contract Opps'[Account Name],'Service 4 - Contract accts'[Account Name], 'Service 4 - Contract accts'[Account Name]),0)- ryan_mayu
Super User
you can have two data type in one column. i guess the account name is text.
you can try this
Has an opportunity? =IFERROR (LOOKUPVALUE ('Service 3 - Contract Opps'[Account Name],'Service 4 - Contract accts'[Account Name], 'Service 4 - Contract accts'[Account Name]),"0")
- Ashish_Mathur
Super User
Hi,
Write this calculated column formula in the Service 4 - Contract accts table
=LOOKUPVALUE('Service 3 - Contract Opps'[Account Name],'Service 3 - Contract Opps'[Account Name], 'Service 4 - Contract accts'[Account Name])
Does this work?
- amiller5
Helper II
This works but it brings in the lookup value text of the account name. I want to create a column where if the name appears in the other table, it gets a value of 1.00 and if not, it get a value of 0.00.
- Ashish_Mathur
Super User
Hi,
Try this
=if(isblank(LOOKUPVALUE('Service 3 - Contract Opps'[Account Name],'Service 3 - Contract Opps'[Account Name], 'Service 4 - Contract accts'[Account Name])),0,1)Hope this helps.