<?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 If a certain filter is applied return 1, if a different filter is applied return 2 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-a-certain-filter-is-applied-return-1-if-a-different-filter-is/m-p/2853225#M91563</link>
    <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column within a tbale that contins 3 distinct values Red, Green, Blue across 1500 rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a dax measure that i can apply to a card that when the table is filtered on Red returns the number 1, when it is filtered on blue returns the number 2 and green returns the number 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible and if so how?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jack&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 09:11:38 GMT</pubDate>
    <dc:creator>JGARROD</dc:creator>
    <dc:date>2022-10-20T09:11:38Z</dc:date>
    <item>
      <title>If a certain filter is applied return 1, if a different filter is applied return 2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-a-certain-filter-is-applied-return-1-if-a-different-filter-is/m-p/2853225#M91563</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column within a tbale that contins 3 distinct values Red, Green, Blue across 1500 rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a dax measure that i can apply to a card that when the table is filtered on Red returns the number 1, when it is filtered on blue returns the number 2 and green returns the number 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible and if so how?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jack&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 09:11:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-a-certain-filter-is-applied-return-1-if-a-different-filter-is/m-p/2853225#M91563</guid>
      <dc:creator>JGARROD</dc:creator>
      <dc:date>2022-10-20T09:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: If a certain filter is applied return 1, if a different filter is applied return 2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-a-certain-filter-is-applied-return-1-if-a-different-filter-is/m-p/2853293#M91573</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Colour number = &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Colour]),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;"Red"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;"Blue"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;"Green"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;3&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;P&gt;Thanks for reaching out for help.&lt;/P&gt;
&lt;P&gt;I put in a lot of effort to help you, now please quickly help me by giving kudos.&lt;/P&gt;
&lt;P&gt;Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.&amp;nbsp; I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the&amp;nbsp;technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One question per ticket please. If you need to extend your request then please raise a new ticket.&lt;/P&gt;
&lt;P&gt;You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Oct 2022 09:35:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-a-certain-filter-is-applied-return-1-if-a-different-filter-is/m-p/2853293#M91573</guid>
      <dc:creator>speedramps</dc:creator>
      <dc:date>2022-10-20T09:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: If a certain filter is applied return 1, if a different filter is applied return 2</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-a-certain-filter-is-applied-return-1-if-a-different-filter-is/m-p/2853312#M91575</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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;LI-CODE lang="markup"&gt;Expected result measure: =
SWITCH (
    SELECTEDVALUE ( Category[Color] ),
    "Red", 1,
    "Blue", 2,
    "Green", 3,
    "select one color"
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 09:40:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-a-certain-filter-is-applied-return-1-if-a-different-filter-is/m-p/2853312#M91575</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-20T09:40:24Z</dc:date>
    </item>
  </channel>
</rss>

