Forum Discussion
charleshale
Continued Contributor
3 years agoResources for basic Dax Group By Concatenating Values
Does anyone have any resources or guides for how to achieve the equivalent to M Query's Group By in DAX with turning a secondary column into a list of values? I'm not seeing how to do that in guide...
- 3 years ago
you can try something like:
Table = ADDCOLUMNS(VALUES([email]), "Accessed From", CONCATENATEX(Table, [Accessed From], "|")) - 3 years ago
As a calculated table:
Table2 = SUMMARIZE ( 'Table', 'Table'[Email], "Accessed From", CONCATENATEX ( VALUES ( 'Table'[Accessed From] ), 'Table'[Accessed From], " | " ) ) - 3 years ago
Update - this code fixed the problem
a_usacities_sum =ADDCOLUMNS(DISTINCT(SUMMARIZE(a_uscities, a_uscities[city], a_uscities[Count Dupes])),"States",VAR _city = a_uscities[city]RETURNCALCULATE(CONCATENATEX(VALUES ( 'a_uscities'[state_id] ),'a_uscities'[state_id]," | "),a_uscities[city] = _city))
danextian
Super User
3 years agoAs a calculated table:
Table2 =
SUMMARIZE (
'Table',
'Table'[Email],
"Accessed From",
CONCATENATEX (
VALUES ( 'Table'[Accessed From] ),
'Table'[Accessed From],
" | "
)
)