Forum Discussion
Relationship for Comma seperated id column
- 4 years ago
I did not want to split into rows as i wanted to view the cell value with comma seperated items. But this made me think and i went with splitting the arrays to rows and then did a custom measure later where i concatenated everything back.
This link helped me Solved: group by and then concateate comma separated - Microsoft Power BI Community
The custom measure is like belowCombined Ast = VAR __rlvnttable = CALCULATETABLE ( VALUES ( 'ToGroupAnwsers'[Document.Questions] ), 'ToGroupAnwsers'[Document.Questions] <> BLANK () ) RETURN CONCATENATEX ( __rlvnttable, 'ToGroupAnwsers'[Document.Questions], ", ", 'ToGroupAnwsers'[Document.Questions], ASC )Will keep in mind to post data in next post 🙂
Split that column into rows, not additional columns.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
I did not want to split into rows as i wanted to view the cell value with comma seperated items. But this made me think and i went with splitting the arrays to rows and then did a custom measure later where i concatenated everything back.
This link helped me Solved: group by and then concateate comma separated - Microsoft Power BI Community
The custom measure is like below
Combined Ast =
VAR __rlvnttable =
CALCULATETABLE (
VALUES ( 'ToGroupAnwsers'[Document.Questions] ),
'ToGroupAnwsers'[Document.Questions] <> BLANK ()
)
RETURN
CONCATENATEX (
__rlvnttable,
'ToGroupAnwsers'[Document.Questions],
", ",
'ToGroupAnwsers'[Document.Questions], ASC
)
Will keep in mind to post data in next post 🙂