<?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 Save value from a table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084207#M15420</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am feeling pretty lost with DAX. I have a doubt I would know how to solve if the cell was a number, as I would store in a measure the value using CALCULATE(SUM(Value), Filter), but I do not know how to do it once the value I want to store is a varchar...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value 1 Value 2 Value 3&lt;/P&gt;&lt;P&gt;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Z&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would want to have a measure that contains Value 1 = 'X' because I have chosen Value 3 = 'Z'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 11 May 2020 13:58:50 GMT</pubDate>
    <dc:creator>maserr</dc:creator>
    <dc:date>2020-05-11T13:58:50Z</dc:date>
    <item>
      <title>Save value from a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084207#M15420</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am feeling pretty lost with DAX. I have a doubt I would know how to solve if the cell was a number, as I would store in a measure the value using CALCULATE(SUM(Value), Filter), but I do not know how to do it once the value I want to store is a varchar...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value 1 Value 2 Value 3&lt;/P&gt;&lt;P&gt;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Z&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would want to have a measure that contains Value 1 = 'X' because I have chosen Value 3 = 'Z'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 13:58:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084207#M15420</guid>
      <dc:creator>maserr</dc:creator>
      <dc:date>2020-05-11T13:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Save value from a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084262#M15423</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="179433" data-lia-user-login="maserr" class="lia-mention lia-mention-user"&gt;maserr&lt;/a&gt;&amp;nbsp; DAX measures are dynamic. We cannot store the value based on the previous selection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you select&amp;nbsp;&lt;SPAN&gt;Value 3 = 'Z' below measure will return 'X'. But the moment you select another value or deselect the Value 3, result will change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Val1 = SELECTEDVALUE(MyTable[Value1])&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 14:29:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084262#M15423</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-05-11T14:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Save value from a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084338#M15427</link>
      <description>&lt;P&gt;You say you want to "save" a choice. As the first reply pointed out there is no way to have anything like a global variable in DAX. However, you can put the possible selections into a separate table that has no relationships to the table you have your data in. This is an example of the DAX pattern "Parameter Table"&amp;nbsp;&lt;A href="https://www.daxpatterns.com/parameter-table/" target="_blank"&gt;https://www.daxpatterns.com/parameter-table/&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then when the user selects a value from the parameter table list, it will be available for you to use in your measures, and you can use it to lookup the corresponding value in your data table by using a function like LOOKUPVALUE(). Since the parameter table is no related to your data table any selection the user makes on the data table rows will not change the value selected in the parameter table.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 15:06:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084338#M15427</guid>
      <dc:creator>kentyler</dc:creator>
      <dc:date>2020-05-11T15:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Save value from a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084371#M15428</link>
      <description>&lt;P&gt;I think I have not explained myself enough. I would want to achieve which is proposing the accepted solution from this post but with varchar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Measures-with-KPI/m-p/1078163#M15168" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Measures-with-KPI/m-p/1078163#M15168&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 15:26:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084371#M15428</guid>
      <dc:creator>maserr</dc:creator>
      <dc:date>2020-05-11T15:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Save value from a table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084394#M15430</link>
      <description>&lt;P&gt;So, you wish to match a given value against a set of "target" values, but your problem is that the target values are strings instead of numbers... can you give us an example of the actual target values you want to use.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you will have to list all of your target strings. You probably not be able to use anything like, greater than or less than with strings. So your table of targets would be larger, but would work just by matching, using LOOKUPVALUE(), for example.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 15:37:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Save-value-from-a-table/m-p/1084394#M15430</guid>
      <dc:creator>kentyler</dc:creator>
      <dc:date>2020-05-11T15:37:33Z</dc:date>
    </item>
  </channel>
</rss>

