<?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: How to get number of rows in a table based on a single column used in two different types? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3775651#M147547</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707501" data-lia-user-login="Daoud_H" class="lia-mention lia-mention-user"&gt;Daoud_H&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the prompt response, but I have tried this already, but it is not working and giving some incorrect number in front of rows even where it is not a parent row. For example, I am getting some random number in front of 19 and 20 instead of 18.&lt;BR /&gt;&lt;BR /&gt;I will try to upload the PBIX file with some sample data if possible, but I think since the fact table is having so many extra columns, maybe that is causing some extra filteration or something to happen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 14:29:20 GMT</pubDate>
    <dc:creator>Aksh_1234</dc:creator>
    <dc:date>2024-03-19T14:29:20Z</dc:date>
    <item>
      <title>How to get number of rows in a table based on a single column used in two different types?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3775549#M147543</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need one quick help here, In my data, I have kind of a Parent-Child like structure in my fact table in a single column, but I have created another table which defines parent child relationship as below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now, in my fact table, I have only index column and I have two text columns to compare the actual and expected values and define them as TRUE or FALSE.&lt;BR /&gt;&lt;BR /&gt;So, fact table is like&lt;BR /&gt;Index --- Actual --- Expected&lt;/P&gt;&lt;P&gt;18&lt;/P&gt;&lt;P&gt;19&amp;nbsp; ---- Yes ----- Yes&lt;/P&gt;&lt;P&gt;20 ----- Yes ----- No&lt;/P&gt;&lt;P&gt;21 ----- No ----- No&lt;BR /&gt;&lt;BR /&gt;So, for index 19,20,21, I can easily say that 19 and 21 is True and 20 is False. But, for 18 (which is parent for 19,20,21), I need to see if all the child indexes the true, then only I will be able to mark it as true. For this, I am trying an approach where I am getting the count of child indexes first (which I am able to do using DAX and parent child relation table) and then get the count of True rows for those child (this is where I need help), and if both these counts are equal then I am marking 18 as True else False.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me with DAX where I can get the count of Trues for all the child under any given parent?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 13:42:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3775549#M147543</guid>
      <dc:creator>Aksh_1234</dc:creator>
      <dc:date>2024-03-19T13:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of rows in a table based on a single column used in two different types?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3775611#M147546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="708259" data-lia-user-login="Aksh_1234" class="lia-mention lia-mention-user"&gt;Aksh_1234&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming you have a parent-child relationship table named "ParentChildRelationship"&amp;nbsp;with columns&amp;nbsp;"ParentIndex"&amp;nbsp;and&amp;nbsp;"ChildIndex", and your fact table is named&amp;nbsp;"FactTable"&amp;nbsp;with columns&amp;nbsp;"Index",&amp;nbsp;"Actual", and&amp;nbsp;"Expected", you can create a measure like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CountTrueForChildren = 
VAR ParentIndex = SELECTEDVALUE('FactTable'[Index])
VAR ChildRows = 
    CALCULATE(
        COUNTROWS('FactTable'),
        FILTER(
            'ParentChildRelationship',
            'ParentChildRelationship'[ParentIndex] = ParentIndex
        )
    )
VAR TrueChildRows = 
    CALCULATE(
        COUNTROWS('FactTable'),
        FILTER(
            'ParentChildRelationship',
            'ParentChildRelationship'[ParentIndex] = ParentIndex &amp;amp;&amp;amp;
            'FactTable'[Actual] = "Yes" &amp;amp;&amp;amp;
            'FactTable'[Expected] = "Yes"
        )
    )
RETURN
IF(ChildRows = TrueChildRows, TRUE(), FALSE())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 14:12:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3775611#M147546</guid>
      <dc:creator>Daoud_H</dc:creator>
      <dc:date>2024-03-19T14:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of rows in a table based on a single column used in two different types?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3775651#M147547</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707501" data-lia-user-login="Daoud_H" class="lia-mention lia-mention-user"&gt;Daoud_H&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the prompt response, but I have tried this already, but it is not working and giving some incorrect number in front of rows even where it is not a parent row. For example, I am getting some random number in front of 19 and 20 instead of 18.&lt;BR /&gt;&lt;BR /&gt;I will try to upload the PBIX file with some sample data if possible, but I think since the fact table is having so many extra columns, maybe that is causing some extra filteration or something to happen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 14:29:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3775651#M147547</guid>
      <dc:creator>Aksh_1234</dc:creator>
      <dc:date>2024-03-19T14:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of rows in a table based on a single column used in two different types?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3777322#M147642</link>
      <description>&lt;P&gt;Hey &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707501" data-lia-user-login="Daoud_H" class="lia-mention lia-mention-user"&gt;Daoud_H&lt;/a&gt;&amp;nbsp;you can find the PBIX file here -&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1D7-ibijR8lgHJ1NeB5u6_EcoLa3PVoYV/view?usp=drivesdk" target="_blank"&gt;https://drive.google.com/file/d/1D7-ibijR8lgHJ1NeB5u6_EcoLa3PVoYV/view?usp=drivesdk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uploading from different id couldnt use the same id&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 06:54:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-number-of-rows-in-a-table-based-on-a-single-column/m-p/3777322#M147642</guid>
      <dc:creator>Aksh_12345</dc:creator>
      <dc:date>2024-03-20T06:54:15Z</dc:date>
    </item>
  </channel>
</rss>

