Forum Discussion
nrowey
3 years agoHelper I
IF statement between two joined tables on multiple values
I have two joined tables, I want to create a new column containing a value from one table based on a colum value in the other. e.g based on table COA1 colum name "accounttype" evaluating to a "S" ...
Shaurya
3 years agoMemorable Member
Hi nrowey,
You can use:
Gross = IF('COA1'[AccountType] = "C" || 'COA1'[AccountType] = "S",
LOOKUPVALUE('GLDetail'[PostingAmount], 'GLDetail'[JoinColumn], 'COA1'[JoinColumn]), 0)
Mark this post as a solution if that works for you!
Consider taking a look at my blog: Forecast Period - Previous Forecasts
- nrowey3 years agoHelper IStatement I entered and error result below.thance for any guidenceGross = IF('COA1'[AccountType] = "C" || 'COA1'[AccountType] = "S",LOOKUPVALUE('GLDetail'[PostingAmount], 'GLDetail'[Match], 'COA1'[HOSTITEMID]), 0)error:A single value for column 'HOSTITEMID' in table 'COA1' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result