Forum Discussion

jefflynn's avatar
jefflynn
Frequent Visitor
2 years ago

Concatenate not working

I want to concatenate Employee Number (text) with SelectedEndYearMeasure.

Selected End = SELECTEDVALUE ('Cal End'[End Date]) - measure

SelectedEndYearMeasure = Year([Selected End])
My column to concatenate:
EmployeeSelectedEndYear = CONCATENATE('Raw Data'[Employee Number], [SelectedEndYearMeasure]
This only returns the Employee Number, there is no error.
 
Thanks in advance for any help!

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    jefflynn If that is a calculated column, probably won't work as measures don't generally work in calculated columns. You could use a measure form like: 

    EmployeeSelectedEndYearMeasure = CONCATENATE(MAX('Raw Data'[Employee Number])[SelectedEndYearMeasure]

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,jefflynn Hello,Greg_Deckler ,

    thanks for your concern about this issue.

    Your answer is excellent!
    And I would like to share some additional solutions below
    I am glad to help you.

    According to your description, you have a problem with splicing fields of type Text [Employee Number] and measure [SelectedEndYearMeasure] using function Concatenate:Concatenate not working

    Here is the test I performed:

    In my test environment, Concatenate works fine.

    One thing to note: [Selected End] and [SelectedEndYearMeasure] are both measures

    I tried the suggestion provided by@Greg_Deckler and it works fine (create measure)

    Even when I create it using calculate column, the created calculate column works fine!

    However, that normal operation at this point assumes that only one date value exists in the calendar table

    The problem occurs when the data in the calendar table is modified to multiple values:

    You will find that the CONCATENATE function doesn't work, (actually because the selectedValue function gets more than one value).

    Although this is not consistent with the final result you show (in your result Select End is shown normally), in my test environment [Selected End] does not show the data

    Because I think it may be due to the difference in computing environment.

    Can you please confirm that your [Selected End] only returns a unique date value for each record, not multiple values?

    Can you provide more non-sensitive information such as the relationship between 'Raw Data' and [Cal End][End Date]?

    If possible, could you provide a pbix file that does not contain sensitive information, this would be helpful in solving your problem.

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

    Best Regards,

    Carson Jian,

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,jefflynn .
    If your problem has been solved, and if so, mark the suggestion you provided as a solution.

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

    Best Regards,

    Carson Jian,

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.