# Why isnt this DAX formula working?



## nmss18 (Feb 8, 2013)

Hello,
I am trying to concatenate 2 colums and I cannot figure out why this seemingly simple task is not working.

I am using this formula:

=CONCATENATE(Dates[Day]& " - ", CONCATENATE('talmon 2012'[Time of Day]))

It is giving me the following error:
Too few arguments were passed to the CONCATENATE function. The minimum argument count for the function is 2.

Can anyone assist?
Much appreciated!
Nathan


----------



## MD610 (Feb 8, 2013)

The second Concatenate is not necessary.

Actually, neither of them are.  I rarely use Concatenate because "&" will give you the same result and is easier to read in my opinion.

Try this: 
='Dates'[Day] & " - " & 'talmon 2012'[Time of Day]


----------



## nmss18 (Feb 8, 2013)

Thanks for replying. I tried that and received this error:


The value for column 'Day' in table 'Dates' cannot be determined in the current context. Check that all columns referenced in the calculation expression exist, and that there are no circular dependencies.


----------



## MD610 (Feb 8, 2013)

Sorry, I wasn't paying close attention.  Since these columns are in 2 different tables, you need to add a RELATED().  I assume you are trying to create this field in 'talmon 2012' and there is already a relationship with 'Dates'.

=RELATED('Dates'[Day]) & " - " & 'talmon 2012'[Time of Day]

This should work.  RELATED() pulls the field from the Lookup table into the main table.


----------



## nmss18 (Feb 8, 2013)

that worked!
thanks very much. This is immensely helpful.


----------

