<?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 Re: Return value from another column based on conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270179#M169336</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="747410" data-lia-user-login="Ankur04" class="lia-mention lia-mention-user"&gt;Ankur04&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="777262" data-lia-user-login="SachinNandanwar" class="lia-mention lia-mention-user"&gt;SachinNandanwar&lt;/a&gt;&amp;nbsp; Thanks a lot guys!&lt;BR /&gt;&lt;BR /&gt;I used both of your suggestions and they both work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Nov 2024 07:21:16 GMT</pubDate>
    <dc:creator>holywasabi</dc:creator>
    <dc:date>2024-11-05T07:21:16Z</dc:date>
    <item>
      <title>Return value from another column based on conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270093#M169328</link>
      <description>&lt;P&gt;Hi folks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table called "Employee History", it has a column named "Salary".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help offered, much thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a calculated column called "&lt;STRONG&gt;Salary Sort col&lt;/STRONG&gt;" :&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Conditions will be based on a supporting table named "Salary sort"&lt;/LI&gt;&lt;LI&gt;Supporting table --&amp;gt; "Salary sort" has 3 columns : Salary Range, Min, Max&lt;/LI&gt;&lt;LI&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Employee History'&lt;/SPAN&gt;&lt;SPAN&gt;[salary]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;'Salary sort'&lt;/SPAN&gt;&lt;SPAN&gt;[Min]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Employee History'&lt;/SPAN&gt;&lt;SPAN&gt;[salary]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;'Salary sort'&lt;/SPAN&gt;&lt;SPAN&gt;[Max]&lt;/SPAN&gt;&lt;SPAN&gt; ), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;'Salary sort'&lt;/SPAN&gt;&lt;SPAN&gt;[Salary Range]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Idk what I'm doing wrong but my calculated column shows nothing&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File link :&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1fX_QSxj3OVJhG3jGk9hLuZXz5sUFESPF/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1fX_QSxj3OVJhG3jGk9hLuZXz5sUFESPF/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Nov 2024 06:04:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270093#M169328</guid>
      <dc:creator>holywasabi</dc:creator>
      <dc:date>2024-11-05T06:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Return value from another column based on conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270111#M169329</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="770950" data-lia-user-login="holywasabi" class="lia-mention lia-mention-user"&gt;holywasabi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would suggest you to create a calculated column as below to achieve the requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Salary Range&amp;nbsp; = If(Salary &amp;gt;0 &amp;amp;&amp;amp; Salary &amp;lt; 39999,"Below $40k",if(Salary &amp;gt;39999 &amp;amp;&amp;amp; Salary &amp;lt; 59999,"$40 - $59k", and so on)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me know if this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 06:21:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270111#M169329</guid>
      <dc:creator>Ankur04</dc:creator>
      <dc:date>2024-11-05T06:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Return value from another column based on conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270138#M169333</link>
      <description>&lt;LI-CODE lang="markup"&gt;Salary Range col =
CALCULATE (
    VALUES ( 'Salary sort'[Salary Range] ),
    FILTER (
        'Salary sort',
        'Employee History'[salary] &amp;gt;= 'Salary sort'[Min]
            &amp;amp;&amp;amp; 'Employee History'[salary] &amp;lt;= 'Salary sort'[Max]
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 06:48:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270138#M169333</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-11-05T06:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Return value from another column based on conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270179#M169336</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="747410" data-lia-user-login="Ankur04" class="lia-mention lia-mention-user"&gt;Ankur04&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="777262" data-lia-user-login="SachinNandanwar" class="lia-mention lia-mention-user"&gt;SachinNandanwar&lt;/a&gt;&amp;nbsp; Thanks a lot guys!&lt;BR /&gt;&lt;BR /&gt;I used both of your suggestions and they both work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 07:21:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-from-another-column-based-on-conditions/m-p/4270179#M169336</guid>
      <dc:creator>holywasabi</dc:creator>
      <dc:date>2024-11-05T07:21:16Z</dc:date>
    </item>
  </channel>
</rss>

