<?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 DAX Returning thousands of unrelated rows when trying to removefilters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4119916#M163569</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to get my head around some DAX related to Azure DevOps for the past few hours and I am in need of help.&lt;/P&gt;&lt;P&gt;I have got the DAX to return correctly but it also returns&amp;nbsp;&lt;EM&gt;hundreds of&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;thousands&lt;/EM&gt; of rows that I do not expect, and where there is no relationship.&lt;/P&gt;&lt;P&gt;I want the DAX to report the total project hours irrelevent of other filters (except for the project itself)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX in question is:&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;	MEASURE UserStories_Tickets[HoursCompleted] = 
		SUM(Tasks[CompletedWork])
	
    MEASURE 'Projects'[Total_Hours] = 
		CALCULATE (
			[HoursCompleted] ,
			Projects
			,ALL(Tasks)
			,ALL(Task_Update_Calendar)
		)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When this is presented in a table with fields from Project I get results as expected. But as soon as I add the title from the UserStories_Tickets table I get thousands of rows reporting.&lt;/P&gt;&lt;P&gt;I suspect this is a result of the Auto-Exist behaviour but I cannot resolve it. I have tried what seems like hundreds of different filters in the measure but whenever I get the correct 'hours' at a project level, it also creates the issue with thousands of non related rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My tables are connected as follows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The calendar is on the Task Revisions because I visualize the data per the week the task hours are updated, which can be split over multiple weeks per task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result should look like the following&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Project[Title]&lt;/TD&gt;&lt;TD&gt;UserStories_Tickets[Title]&lt;/TD&gt;&lt;TD&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Task_Update_Calendar[Year_Week]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;UserStories_Tickets[HoursCompleted]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Projects[Total_Hours]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;2023_41&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;14.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;2023_41&lt;/TD&gt;&lt;TD&gt;3.5&lt;/TD&gt;&lt;TD&gt;14.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;2023_42&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;14.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;2023_41&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DEF&lt;/TD&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;2023_41&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;GHI&lt;/TD&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;2023_41&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2024 05:31:12 GMT</pubDate>
    <dc:creator>zabman</dc:creator>
    <dc:date>2024-08-27T05:31:12Z</dc:date>
    <item>
      <title>DAX Returning thousands of unrelated rows when trying to removefilters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4119916#M163569</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to get my head around some DAX related to Azure DevOps for the past few hours and I am in need of help.&lt;/P&gt;&lt;P&gt;I have got the DAX to return correctly but it also returns&amp;nbsp;&lt;EM&gt;hundreds of&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;thousands&lt;/EM&gt; of rows that I do not expect, and where there is no relationship.&lt;/P&gt;&lt;P&gt;I want the DAX to report the total project hours irrelevent of other filters (except for the project itself)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX in question is:&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;	MEASURE UserStories_Tickets[HoursCompleted] = 
		SUM(Tasks[CompletedWork])
	
    MEASURE 'Projects'[Total_Hours] = 
		CALCULATE (
			[HoursCompleted] ,
			Projects
			,ALL(Tasks)
			,ALL(Task_Update_Calendar)
		)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When this is presented in a table with fields from Project I get results as expected. But as soon as I add the title from the UserStories_Tickets table I get thousands of rows reporting.&lt;/P&gt;&lt;P&gt;I suspect this is a result of the Auto-Exist behaviour but I cannot resolve it. I have tried what seems like hundreds of different filters in the measure but whenever I get the correct 'hours' at a project level, it also creates the issue with thousands of non related rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My tables are connected as follows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The calendar is on the Task Revisions because I visualize the data per the week the task hours are updated, which can be split over multiple weeks per task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result should look like the following&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Project[Title]&lt;/TD&gt;&lt;TD&gt;UserStories_Tickets[Title]&lt;/TD&gt;&lt;TD&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Task_Update_Calendar[Year_Week]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;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;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 05:31:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4119916#M163569</guid>
      <dc:creator>zabman</dc:creator>
      <dc:date>2024-08-27T05:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Returning thousands of unrelated rows when trying to removefilters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4121243#M163625</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE 'Projects'[Total_Hours] = 
		CALCULATE (
			[HoursCompleted] ,
			Projects
			,ALL(Tasks)
			,ALL(Task_Update_Calendar)
		)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's the purpose of including Projects? Not only are you filtering an entire table, but you are filtering&amp;nbsp; its expanded table too.&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/filter-columns-not-tables-in-dax/" target="_blank"&gt;Filter columns, not tables, in DAX - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 17:25:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4121243#M163625</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-27T17:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Returning thousands of unrelated rows when trying to removefilters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4121526#M163647</link>
      <description>&lt;P&gt;Hi - to be completely honest I don't know. This was one of the few ways I was able to get this to give me the correct result. When I remove this, I get memory issues and the dax does not resolve&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 22:05:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4121526#M163647</guid>
      <dc:creator>zabman</dc:creator>
      <dc:date>2024-08-27T22:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Returning thousands of unrelated rows when trying to removefilters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4121542#M163652</link>
      <description>&lt;P&gt;Use DAXDEBUGOUTPUT and EVALUATEANDLOG to see where it goes wonky.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And read that article I linked to.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 22:22:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Returning-thousands-of-unrelated-rows-when-trying-to/m-p/4121542#M163652</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-27T22:22:27Z</dc:date>
    </item>
  </channel>
</rss>

