Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hey there,
It is a simple example of what I need to achieve:
If I select the answer "ddddd" then the table should show all the answers from the "recipientID" answers, not only the answer that was selected in the filter.
I cannot filter by RecipientID in the filter in the real world situation.
Does anybody know how I can do this using magic of dax?
Here is the file:
Hi @ignas ,
Follow the steps below:
Answers = DISTINCT(Survey[Answer])
Filter answer = VAR USERID = LOOKUPVALUE ( Survey[RecipientID]; Survey[Answer]; VALUES ( Answers[Answer] ) ) RETURN IF ( DISTINCTCOUNT ( Answers[Answer] ) = CALCULATE ( DISTINCTCOUNT ( Answers[Answer] ); ALL ( Answers ) ); 1; IF ( VALUES ( Survey[RecipientID] ) = USERID; 1; BLANK () ) )
Be aware that if the answer is given by more than 1 person this will return an error. If you select all the answers it will return the full table.
Check result attach (file is saved on June version)
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHey @MFelix
Very nice try, but unfortunately it could not work in any way, because in my real dataset I have over 10mln entries and some of them are repeating. Any other solution with Dax that could work?
I have a solution where I create a separate table from all of these answers and it works just fine, but it consumes space for storing a copy of data in a separate table.
Thanks for helping.
Cheers
Ignas
Hi @ignas ,
Not aware that you had such a big database, it was not clear on your message.
In my example it is also creating an additional table on the model, because looking at interactions between the visuals if they are from the same table they will filter out the information so you are being a victim of the setup of the data.
If you have a single table and you have a slicer and a chart when you apply filter on the slicer the corresponding visual will have the same filter you cannot dissociate one from the other since they are within the same table.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Portuguêshi,
maybe you can create another visual for "ddddd" filter alone, and hide the "ddddd" option from the slicer.
Create this measure:
Measure = CALCULATE(COUNT(Survey[RecipientID]), Survey[Answer] = "ddddd")
to do the visual filter for "ddddd" table.
unlink the visual interaction between slicer and "ddddd" table.
you can check PBI here:
https://1drv.ms/u/s!Aps8poidQa5zk6p365C2AuB5YH8Lxg
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |