Forum Discussion
bsz412
Helper III
4 years agohow do I change date format in CONCATENATEX
Hi, I would need to create a list on a card which shows the months I chose from a slicer, in this format: Example: Jan21, Feb21, Mar21, Apr21 With the following code I could create somet...
- 4 years ago
Without knowing what your Dates table looks like, you can try something like:
Measure = VAR _MMMYYTable = SUMMARIZE( GENERATE( Dates, ROW( "label", FORMAT( Dates[Date], "MMMYY" ) ) ), [label] ) VAR _concat = CONCATENATEX( _MMMYYTable, [label], ", " ) RETURN _concatNote that if you add a column to your Dates table with the text you want, e.g. a [MMMYY] column, then _MMMYYTable = VALUES ( Dates[MMMYY] ) could be used instead of the SUMMARIZE/GENERATE
MarkLaf
Super User
4 years agoWithout knowing what your Dates table looks like, you can try something like:
Measure =
VAR _MMMYYTable =
SUMMARIZE(
GENERATE( Dates, ROW( "label", FORMAT( Dates[Date], "MMMYY" ) ) ),
[label]
)
VAR _concat =
CONCATENATEX( _MMMYYTable, [label], ", " )
RETURN
_concat
Note that if you add a column to your Dates table with the text you want, e.g. a [MMMYY] column, then _MMMYYTable = VALUES ( Dates[MMMYY] ) could be used instead of the SUMMARIZE/GENERATE
- bsz4124 years ago
Helper III
Thanks so much, both versions you provided work perfectly! Awesome!