<?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: Need help in DAX Logic in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935611#M96720</link>
    <description>&lt;P&gt;&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;Thank you again for answering. This is not working. It is giving answer only when country name = "B" and even that answer to is wrong.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2022 11:13:16 GMT</pubDate>
    <dc:creator>saurabhtd</dc:creator>
    <dc:date>2022-11-29T11:13:16Z</dc:date>
    <item>
      <title>Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2934449#M96631</link>
      <description>&lt;P&gt;I want to do a calculation of DISTINCTCOUNT(TableName[customercode]) of customers from all three countries. But when I select country from countryname filter these conditions should be satisfied.&lt;/P&gt;&lt;P&gt;when countryname = "A" I need to take data from sourcename = "X"&lt;BR /&gt;when countryname = "B" I need to take data from sourcename = "X"&lt;BR /&gt;when countryname = "C" I need to take data from sourcename = "Z"&lt;/P&gt;&lt;P&gt;There are two filters applied sourcename and countryname.&lt;/P&gt;&lt;P&gt;Note : Customercode,countryname,sourcename are from same table.&lt;/P&gt;&lt;P&gt;I am unable to write required dax to fulfill these conditions. Can someone please help ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 04:13:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2934449#M96631</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2022-11-29T04:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2934492#M96633</link>
      <description>&lt;P&gt;take data from sourcename = "X", then what?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 04:57:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2934492#M96633</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-11-29T04:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2934499#M96634</link>
      <description>&lt;P&gt;Then calculate DISTINCTCOUNT of customer code&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 05:02:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2934499#M96634</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2022-11-29T05:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935111#M96670</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478644" data-lia-user-login="saurabhtd" class="lia-mention lia-mention-user"&gt;saurabhtd&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=
VAR SourceN =
    SWITCH (
        SELECTEDVALUE ( TableName[CountryName] ),
        "A", "X",
        "B", "X",
        "C", "Z"
    )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( TableName[customercode] ),
        TableName[SourceName] = SourceN
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Nov 2022 08:52:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935111#M96670</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-11-29T08:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935436#M96698</link>
      <description>&lt;P&gt;Thanks for replying. Now when I select particular country in filter I am getting required answer. But how to get deafult condition which is&amp;nbsp; to calculate distinctcount(customer code) when all the countries 'A','B','C' are selected in the filter.&amp;nbsp; I am strucked at this point now.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 10:05:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935436#M96698</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2022-11-29T10:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935539#M96707</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478644" data-lia-user-login="saurabhtd" class="lia-mention lia-mention-user"&gt;saurabhtd&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I believe this should be fully dynamic therefore no need for default value.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=
VAR SourceN =
    SELECTCOLUMNS (
        VALUES ( TableName[CountryName] ),
        "@Country", SWITCH ( TableName[CountryName], "A", "X", "B", "X", "C", "Z" )
    )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( TableName[customercode] ),
        TableName[SourceName] IN SourceN
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Nov 2022 10:33:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935539#M96707</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-11-29T10:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935611#M96720</link>
      <description>&lt;P&gt;&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;Thank you again for answering. This is not working. It is giving answer only when country name = "B" and even that answer to is wrong.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 11:13:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935611#M96720</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2022-11-29T11:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935638#M96724</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478644" data-lia-user-login="saurabhtd" class="lia-mention lia-mention-user"&gt;saurabhtd&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Would you please share a screenshot of your visual?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 11:26:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935638#M96724</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-11-29T11:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935658#M96725</link>
      <description>&lt;P&gt;&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;I need to used it in a card in report of dashboard. Currently I am verfying on new page.&amp;nbsp; what is purpose of "@country" before switch is ? I have not understood this .&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 11:36:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935658#M96725</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2022-11-29T11:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935740#M96730</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478644" data-lia-user-login="saurabhtd" class="lia-mention lia-mention-user"&gt;saurabhtd&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;It would be really helpful if you could share a sample file to work with. You can share a download link or send to my email. tamer_juma@yahoo.com&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 12:11:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2935740#M96730</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-11-29T12:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in DAX Logic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2950275#M97780</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478644" data-lia-user-login="saurabhtd" class="lia-mention lia-mention-user"&gt;saurabhtd&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has the problem be solved?&lt;/P&gt;
&lt;P&gt;Please consider to mark the reply as solution if it's helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 05:57:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-in-DAX-Logic/m-p/2950275#M97780</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-06T05:57:11Z</dc:date>
    </item>
  </channel>
</rss>

