Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
prvn
Frequent Visitor

Relationship for Comma seperated id column

I have 2 tables as shown below, master table has unique keys and used in other tables. 

Capture.JPG

GroupQuestions table has a column ActivityIds, which are array of master key, i have transformed it into comma seperated and data looks like below

Capture.JPG

After setting the relationship for Masterkey to Grouped Questions as 1:* the report grid does not seem to work when i filter with slicer. The comma seperated ids are not joined.
Capture.JPG

How do i solve this?

1 ACCEPTED SOLUTION
prvn
Frequent Visitor

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 🙂

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @prvn ,

 

Thanks for your feedaback, this will give more people inspiration and help.😊

 

If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Best Regards,
Henry

lbendlin
Super User
Super User

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

prvn
Frequent Visitor

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 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.