<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic dynamic tooltips with parameter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4052578#M160815</link>
    <description>&lt;P&gt;Hello to all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a parameter to use as a filter: Parameter_Slicer with A, B, C as dropdown list&amp;nbsp; to select from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A, B, C are employee names and they have attributes (in the same table), for example are numbers: A_Number, B_Number and C_Number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the matrix (A, actual, previous, delta and so on) I want to have tooltips if A is selected in the Parameter_Slicer that by hovering over A name in the result list, A_Number will appear in tooltip and by hoving over B name, B_number will appear and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By using this DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tooltip =&lt;/P&gt;&lt;P&gt;&amp;nbsp;Var CurrentSlicerValue = selectedvalue('ParameterSlicer'[ParameterSlicer])&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;SWITCH(&lt;/P&gt;&lt;P&gt;&amp;nbsp; True()&lt;/P&gt;&lt;P&gt;CurrentSlicerValue = "A", "&amp;amp;Table[A_number]&amp;amp;",&lt;/P&gt;&lt;P&gt;CurrentSlicerValue = "B", "&amp;amp;Table[B_number]&amp;amp;",&lt;/P&gt;&lt;P&gt;CurrentSlicerValue = "C", "&amp;amp;Table[C_number]&amp;amp;")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an error: MdxScript(Model) (127,27) Calculation error in measure: Column [Parameter Slicer] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas how to solve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 21 Jul 2024 21:14:20 GMT</pubDate>
    <dc:creator>newlearn123</dc:creator>
    <dc:date>2024-07-21T21:14:20Z</dc:date>
    <item>
      <title>dynamic tooltips with parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4052578#M160815</link>
      <description>&lt;P&gt;Hello to all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a parameter to use as a filter: Parameter_Slicer with A, B, C as dropdown list&amp;nbsp; to select from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A, B, C are employee names and they have attributes (in the same table), for example are numbers: A_Number, B_Number and C_Number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the matrix (A, actual, previous, delta and so on) I want to have tooltips if A is selected in the Parameter_Slicer that by hovering over A name in the result list, A_Number will appear in tooltip and by hoving over B name, B_number will appear and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By using this DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tooltip =&lt;/P&gt;&lt;P&gt;&amp;nbsp;Var CurrentSlicerValue = selectedvalue('ParameterSlicer'[ParameterSlicer])&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;SWITCH(&lt;/P&gt;&lt;P&gt;&amp;nbsp; True()&lt;/P&gt;&lt;P&gt;CurrentSlicerValue = "A", "&amp;amp;Table[A_number]&amp;amp;",&lt;/P&gt;&lt;P&gt;CurrentSlicerValue = "B", "&amp;amp;Table[B_number]&amp;amp;",&lt;/P&gt;&lt;P&gt;CurrentSlicerValue = "C", "&amp;amp;Table[C_number]&amp;amp;")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an error: MdxScript(Model) (127,27) Calculation error in measure: Column [Parameter Slicer] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas how to solve?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2024 21:14:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4052578#M160815</guid>
      <dc:creator>newlearn123</dc:creator>
      <dc:date>2024-07-21T21:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic tooltips with parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4052991#M160831</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="778514" data-lia-user-login="newlearn123" class="lia-mention lia-mention-user"&gt;newlearn123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Use MAX or MIN instead of SELECTEDVALUE&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 04:37:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4052991#M160831</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2024-07-22T04:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic tooltips with parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4053100#M160835</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="778514" data-lia-user-login="newlearn123" class="lia-mention lia-mention-user"&gt;newlearn123&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;SPAN&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;very much for the solution, and&amp;nbsp;I've tried other ways to help you understand the problem:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Based on your error message, it appears that the table is using composite keys.&lt;/P&gt;
&lt;P&gt;When I used your code, I made sure that there were only Parameters in the 'ParameterSlicer' column and that my ParameterSlicer table had no complex relationship with the Employee table, and your code is working perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Selected_Number = Var CurrentSlicerValue = selectedvalue('ParameterSlicer'[Parameter])

Return

SWITCH(

  True(),

CurrentSlicerValue = "A", "A Number: " &amp;amp; MAX('EmployeeData'[A_Number]),
   CurrentSlicerValue = "B", "B Number: " &amp;amp; MAX('EmployeeData'[B_Number]),
   CurrentSlicerValue = "C", "C Number: " &amp;amp; MAX('EmployeeData'[C_Number]),
   BLANK()
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If after trying the above you still don't solve the problem, you can also use the Allexcept function to filter out the other columns, here is the documentation on Allexcept.it would be helpful if you could provide me with your data to find a solution. Thanks.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/allexcept-function-dax" target="_blank"&gt;ALLEXCEPT function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Tom Shen&lt;/P&gt;
&lt;P&gt;If this post helps then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 05:44:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4053100#M160835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-22T05:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic tooltips with parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4056155#M160966</link>
      <description>&lt;P&gt;Hi together,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks very much.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 10:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-tooltips-with-parameter/m-p/4056155#M160966</guid>
      <dc:creator>newlearn123</dc:creator>
      <dc:date>2024-07-23T10:23:08Z</dc:date>
    </item>
  </channel>
</rss>

