Forum Discussion
MJG2112
Advocate II
5 months agoDate to Text Format Differences - Causing Me a Big Problem
I have a set of reports that create composite keys using a numeric value and date. It's very basic but serves my needs. CompositeKey = MyTable[EntityID] & "-" & MyTable[Reporting Month] Th...
mizan2390
Super User
5 months agohi MJG2112
The issue you are experiencing is caused by DAX's implicit automatic type conversion when using the & concatenation operator. When you concatenate a date with a string, DAX automatically converts the date into text relying on the local machine's default system settings.
Can you please try the DAX below and see if this solves your problem.
CompositeKey = MyTable[EntityID] & "-" & FORMAT(MyTable[Reporting Month], "dd/MM/yyyy")
If this solves your problem, please give a kudos and mark this as solved.