Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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)
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
Proud to be a Super User!
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?
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
@Anonymous Thank you!! This is definitely on the right track of what I am trying to do. When I put in all my slicers in the DAX code, I get a weird error? Something about "CONTAINROW" function?
Hi @rmcgrath ,
Which fields be applied on the slicers? Could you please provide the related info.
The fields which be applied on the slicers?
It seems that there is some error in the part with red circle in below screenshot...
In order to get a better understanding on your problem and get a suitable solution asap, could you please share a simplified pbix file? It only include some sample(fake) data, the slicers and card visual in it. Please explain your expected result base on your sample data. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hopefully the above link works for you? Please let me know. Also, I attached a screenshot of the expected result / logic. Thank you!
Hi @rmcgrath ,
I can't access to your shared file. Could you please grant me the proper permission to it? Thank you.
Best Regards
@Anonymous I need your email to add you
User | Count |
---|---|
75 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |