Forum Discussion
Dealing with comments
So I have two Fact tables. Ultimately, I want to have a card with comments based on the GroupID from one table and the RecordID from the other table, which also contains the comments (1 comment per RecordID). Here is what I tried, but I cannot seem to get the card to fill in properly with the applicable comments when I filter? All that happens is it shows ALL comments (it won't filter)
8 Replies
- PhilipTreacySuper User
Hi rmcgrath
You haven't shown what you have tried, the image just shows the relationships between tables. How are you filtering?
Please supply your PBIX file.
Phil
- rmcgrathAdvocate II
Hi PhilipTreacy Unfortunately, I cannot attach the file (sensitive info). I will try my best to explain what I have tried:
1. Referenced the "Comment" table
2. Grouped by Record ID
3. Created the 1 to Many Relationship with the "Fact_Live" table (the 1 to many relationship was automatically created with the "Comment" table)
4. Selected the "Card" visual
5. Added the Comment field from the "Comment" table
6. Filtered with the other slicers on the same page (those have fields from the "Fact Live" table)
This is where nothing happens in the "Card" visual with the Comments. What I thought was going to happen, is it would have displayed the comments associated with the Record IDs, all based on the slicer values. But that is not what is happening. I feel like this is a bit more complicated and might need some DAX measures?
- AnonymousNot applicable
Hi rmcgrath ,
You can follow the steps below to get it:
1. Create a measure as below
Measure = VAR _records = CALCULATETABLE ( VALUES ( 'RecordIDTbl'[RecordID] ), FILTER ( 'Fact_Live_House_Weexx', 'Fact_Live_House_Weexx' IN ALLSELECTED ( 'Fact_Live_House_Weexx'[slicerappliedfield] ) ) ) RETURN CONCATENATEX ( FILTER ( 'Comment', 'Comment'[RecordID] IN _records ), 'Comment'[Comment], "," )2. Apply this new measure onto your card visual to replace the original one
If the above one can't help you get the expected result, please provide some fake data in your tables (exclude sensitive data) with Text format, the visuals Fields settings and your expected result with special examples and screenshots. Later I will check if there is any workaround to achieve your requirement. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards