Forum Discussion
How to avoid duplicate values when using ConcatenateX
Hi,
I am using the below method:
It would be easier to tackle your case having a mocking example of your dataset.
Please check the attached file - maybe it is what you need.
Best Regards,
Alexander
4 Replies
- barritownSolution Sage
Hi lafakios,
You should leave only unique values first with the help of VALUES or DISTINCT and then concatenate them.
Like that:
In plain text:
AllDates = CONCATENATEX ( CALCULATETABLE ( VALUES ( Table1[YYYY-MM] ), Table1[Date] < DATE ( 2014, 1, 1 ) ), Table1[YYYY-MM], ", " )Best Regards,
Alexander
- lafakiosHelper I
The above suggestion cannot unfortunately be used in this case.
The item is a kind of key (which is not unique at Table1 but is unique at Table2).
The item is found in Table 1 several times with a different value of YYYY-MM.
In Table2 which has only the distinct values of the items, for each item I would like to have in an column a summary of all YYYY-MM values that are present at the various entries of that item in Table1.
Please note that the YYYY-MM values are handled as text in both tables.
That's why I am using the expression: Table1[Item] = Table2[Item]
- barritownSolution Sage
It would be easier to tackle your case having a mocking example of your dataset.
Please check the attached file - maybe it is what you need.
Best Regards,
Alexander