Forum Discussion
Matriz Contextual Tooltip
I have a matrix where I’m using a field parameter (made up of two measures) in the Values area. My goal is to hover each of the two value columns and show different tooltip results depending on which parameter/measure the mouse is over.
Below is the measure I’m using in the tooltip. The problem is that, no matter which column I hover, the SWITCH always evaluates as if the selected parameter is the first (index 0), and I don’t understand why. Is there a way to achieve what I’m trying to do?
Take a look at “Carregamentos”: it always returns “9” in both columns “9 Eixos” and “4 Eixos” (I hardcoded values in each condition to test: 9 for “9 Eixos” and 4 for “4 Eixos”).
Hi Gepax ,
This is related with the way that Field parameters are configured in the model. The SELECTEDVALUE expression does not work because the columns from field parameters are part of composite keys.
For this you need to use different syntax.
Check this blog post from Marco Russo about that:
https://www.sqlbi.com/blog/marco/2022/06/11/using-selectedvalue-with-fields-parameters-in-power-bi/
Also check this video that has some workarounds for colors, so it can also work for tooltips, but be aware that I have not experimented with your code yet.
7 Replies
- MFelixSuper User
Hi Gepax ,
This is related with the way that Field parameters are configured in the model. The SELECTEDVALUE expression does not work because the columns from field parameters are part of composite keys.
For this you need to use different syntax.
Check this blog post from Marco Russo about that:
https://www.sqlbi.com/blog/marco/2022/06/11/using-selectedvalue-with-fields-parameters-in-power-bi/
Also check this video that has some workarounds for colors, so it can also work for tooltips, but be aware that I have not experimented with your code yet.
- danextianSuper User
Hi Gepax
When hovering a value in a matrix that uses a field parameter, the tooltip does not know which measure is currently being hovered. It only sees the parameter selection, not the specific cell measure. A workaround is to use a disconnected table to return the desired values.
Please see the attached pbix.
- v-pnaroju-msftCommunity Support
Thankyou, MFelix for your response.
Hi Gepax,
We appreciate your inquiry through the Microsoft Fabric Community Forum.
We would like to inquire whether have you got the chance to check the solution provided by MFelix to resolve the issue. We hope the information provided helps to clear the query. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.
Thank you. - v-nmadadi-msftCommunity Support
Hi Gepax
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you - v-nmadadi-msftCommunity Support
Hi Gepax
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you - GepaxAdvocate I
Hey guys, I’m so sorry... I went on vacation and totally forgot about this topic. I haven’t tried the solution yet, and I’m a bit busy right now, but thank you all anyway. As soon as possible, I’ll try it out.
- v-pnaroju-msftCommunity Support
Hi Gepax,
Thankyou for the update. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.Thank you.