<?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: Using ALL function with relationship in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALL-function-with-relationship/m-p/4008488#M157376</link>
    <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With using ALL(), relationships is not effecting to result. Therefore, it is not working.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 07:07:31 GMT</pubDate>
    <dc:creator>scknnylmz</dc:creator>
    <dc:date>2024-06-25T07:07:31Z</dc:date>
    <item>
      <title>Using ALL function with relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALL-function-with-relationship/m-p/4007390#M156944</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate how many question completed by user. For example in this month there are 10 people and 3 of the answered question-1 and 5 of the answered question-2 so question-1 Rates should be 0.3 and question-2: 0.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My formula like that&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;HASONEVALUE(DateSlicer[period])&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp; SELECTVALUE(DateSlicer[period]) = "month"),&lt;/P&gt;&lt;P&gt;CALCULATE(CALCULATE(DISTINCTCOUNT(Table[userID]),Table[Category] = "a", Table[Questions] =MAX(Table[Questions])/CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; DISTINCTCOUNT(Table[userID]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Table[Category] = "a",&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ALL(Table),USERELATIONSHIP(DateSlicer[DateFormats], DateTable[year]))&lt;/P&gt;&lt;P&gt;But in this case I am using ALL functional but it smashing to USERELATIONSHIP Function. So I can not calculate right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can do it with using this USERELATIONSHIP function?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 16:38:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALL-function-with-relationship/m-p/4007390#M156944</guid>
      <dc:creator>scknnylmz</dc:creator>
      <dc:date>2024-06-24T16:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALL function with relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALL-function-with-relationship/m-p/4007503#M156962</link>
      <description>&lt;P&gt;Try only including the columns you explicitly want to be removed from the filter context inside ALL().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, only removing Table[Questions] filter context:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Formula =
VAR _Q = MAX ( Table[Questions] )
VAR _UserCount =
    CALCULATE (
        DISTINCTCOUNT ( Table[userID] ),
        Table[Category] = "a",
        Table[Questions] = _Q
    )
VAR _UserCountAll =
    CALCULATE (
        DISTINCTCOUNT ( Table[userID] ),
        Table[Category] = "a",
        ALL ( Table[Questions] ),
        USERELATIONSHIP ( DateSlicer[DateFormats], DateTable[year] )
    )
RETURN
    IF (
        SELECTEDVALUE ( DateSlicer[period] ) = "month",
        DIVIDE ( _UserCount, _UserCountAll )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 17:47:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALL-function-with-relationship/m-p/4007503#M156962</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2024-06-24T17:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using ALL function with relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALL-function-with-relationship/m-p/4008488#M157376</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With using ALL(), relationships is not effecting to result. Therefore, it is not working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 07:07:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-ALL-function-with-relationship/m-p/4008488#M157376</guid>
      <dc:creator>scknnylmz</dc:creator>
      <dc:date>2024-06-25T07:07:31Z</dc:date>
    </item>
  </channel>
</rss>

