<?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 Getting records in Power Query/SQL for missing data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3692179#M143499</link>
    <description>&lt;P&gt;I have data from a table in SQL that reports telemetry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Product&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporting Date&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 05/02/2024&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 04/02/2024&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to against a date table return&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;09/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;08/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;07/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;06/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;11/12/2023 No Report&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I go about this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get data for dates not found if checking on date but I do not get my product&lt;/P&gt;</description>
    <pubDate>Sat, 10 Feb 2024 08:08:43 GMT</pubDate>
    <dc:creator>avidthinker</dc:creator>
    <dc:date>2024-02-10T08:08:43Z</dc:date>
    <item>
      <title>Getting records in Power Query/SQL for missing data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3692179#M143499</link>
      <description>&lt;P&gt;I have data from a table in SQL that reports telemetry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Product&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporting Date&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 05/02/2024&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 04/02/2024&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to against a date table return&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;09/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;08/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;07/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;06/02/2024 No Report&lt;/P&gt;&lt;P&gt;Product A&amp;nbsp; &amp;nbsp; &amp;nbsp;11/12/2023 No Report&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I go about this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get data for dates not found if checking on date but I do not get my product&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 08:08:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3692179#M143499</guid>
      <dc:creator>avidthinker</dc:creator>
      <dc:date>2024-02-10T08:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Getting records in Power Query/SQL for missing data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3692458#M143518</link>
      <description>&lt;P&gt;to report on things that are not there you need to use disconnected tables and cross joins.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 21:34:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3692458#M143518</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-10T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting records in Power Query/SQL for missing data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3692806#M143546</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437791" data-lia-user-login="avidthinker" class="lia-mention lia-mention-user"&gt;avidthinker&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this is what you are looking for. In my setup, I have a Date table and a Fact table. I have created a column in my Date table "IsValid", I set it to 1 if date exists in Fact Table else 0. Data is on the right side table visual in screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculated Column&lt;/P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AN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Report Exists"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"No Report"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 11 Feb 2024 14:28:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3692806#M143546</guid>
      <dc:creator>talespin</dc:creator>
      <dc:date>2024-02-11T14:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting records in Power Query/SQL for missing data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3710510#M144363</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the explanation and demo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I got big dimension tables would you know a SQL equivalent?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 09:14:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3710510#M144363</guid>
      <dc:creator>avidthinker</dc:creator>
      <dc:date>2024-02-20T09:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting records in Power Query/SQL for missing data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3710699#M144368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437791" data-lia-user-login="avidthinker" class="lia-mention lia-mention-user"&gt;avidthinker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will be like this, let me know if you have any issues&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date table with all the dates.&lt;BR /&gt;Product Table with some records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Logic : You are doing a left outer join between Dates and Product table, which will return all dates from Dates table and matching rows from Product table, whereever there is no matching row, the date column from Product table will be blank, you just need to check if&amp;nbsp; its blank or non-blank using CASE or IIF(For SQL Server).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT Dates.Date, Use CASE or IIF and check if ProductTable.Dates is not blank then "Report Exists" else "No Report"&lt;BR /&gt;from Datetable&lt;BR /&gt;LEFT OUTER JOIN ProductTable&lt;BR /&gt;on Dates.Date = ProductTable.Dates&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 10:13:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-records-in-Power-Query-SQL-for-missing-data/m-p/3710699#M144368</guid>
      <dc:creator>talespin</dc:creator>
      <dc:date>2024-02-20T10:13:27Z</dc:date>
    </item>
  </channel>
</rss>

