Forum Discussion
Issue With Relationship / DAX Not Showing Correct Data
- Anonymous1 year ago
Hi Akash_Varuna ,
Thank you for reaching out to the Microsoft fabric community forum. Also thank you wardy912 for you helful response.
The behavior you observed is due to the way SELECTEDVALUE works; it only returns a single value when there is one value in the current filter context. When a conversation_id is associated with multiple topic_labels, the function will either return one value or blank, which is why you were not getting the expected results.
To address this, you can use CONCATENATEX instead, which will return all topic groups linked to the selected conversation, separated by commas:
Topic Groups = CALCULATE ( CONCATENATEX ( VALUES ( Topics[topic_group] ), Topics[topic_group], ", " ), TREATAS ( VALUES ( Messages_1[topic_label] ), Topics[topic_label] ) )Please find the attached .pbix and test it in your environment. You should now see multiple topic groups correctly displayed whenever a conversation_id maps to more than one label.
Hope this helps, please feel free to rech out for any further questions.
Thank you.
Hi Akash_Varuna ,
I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.
Thank you.