<?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: Fabric Notebook not performing calculations on some data in a semantic model in Data Science</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4609970#M667</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="412811" data-lia-user-login="Neka" class="lia-mention lia-mention-user"&gt;Neka&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your answer and Accept it as answer. It would be greatly appreciated by others in the community who may have the same question&lt;BR /&gt;&lt;BR /&gt;Thank you for being a valued member of the Microsoft Fabric Community Forum!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Mar 2025 10:11:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-03-14T10:11:33Z</dc:date>
    <item>
      <title>Fabric Notebook not performing calculations on some data in a semantic model</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4603946#M659</link>
      <description>&lt;P&gt;I have a notebook that is performing gross and net sales calculations on a semantic model grouped by Source, Date, and Customer. Here is the python code that is calculating the gross sales by date and customer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#Create df of GrossSales grouped by Source, Date, and Customer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df_measure_GrossSales_Customer&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;fabric&lt;/SPAN&gt;&lt;SPAN&gt;.evaluate_measure(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;dataset&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"SemanticModel"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;workspace&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"OurWorkspace"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;measure&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Gross Sales"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;groupby_columns&lt;/SPAN&gt;&lt;SPAN&gt;=[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Source[Source]"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Date[Date]"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Customers[Customer]"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;).rename(&lt;/SPAN&gt;&lt;SPAN&gt;columns&lt;/SPAN&gt;&lt;SPAN&gt;={&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Gross Sales'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'GrossSales'&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;# Rename Gross Sales column&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'SMDate'&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Rename Date column&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am then saving the output into a lakehouse.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sometimes, however, even though there is gross sales in the semantic model for a source, date and customer, the above calculation returns nothing for that date and customer. For example, there should be a customer number and gross sales for 2025-03-09 but there is no row for it in the df. I verified that there is data for that date in the semantic model.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This issue seems to come and go, and I have no idea why some customer numbers and sales get calculated fine by the notebook and others do not. I also have similar code that calculates gross sales just by source and date and it works every time with no issues.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#Create df of GrossSales grouped by Source and Date&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df_measure_GrossSales_Time&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;fabric&lt;/SPAN&gt;&lt;SPAN&gt;.evaluate_measure(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;dataset&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"SemanticModel"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;workspace&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"OurWorkspace"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;measure&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Gross Sales"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;groupby_columns&lt;/SPAN&gt;&lt;SPAN&gt;=[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Source[Source]"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Date[Date]"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;).rename(&lt;/SPAN&gt;&lt;SPAN&gt;columns&lt;/SPAN&gt;&lt;SPAN&gt;={&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Gross Sales'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'GrossSales'&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;# Rename Gross Sales column&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'SMDate'&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Rename Date column&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any suggestions or input about this issue would be greatly appreciated. Thank you!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Mar 2025 19:47:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4603946#M659</guid>
      <dc:creator>Neka</dc:creator>
      <dc:date>2025-03-10T19:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric Notebook not performing calculations on some data in a semantic model</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4604585#M661</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="412811" data-lia-user-login="Neka" class="lia-mention lia-mention-user"&gt;Neka&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you for reaching out to us on Microsoft Fabric Community forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If the measure [Gross Sales] returns BLANK(), the corresponding row is excluded from the results.To address this, you might modify the measure in the Semantic Model using the COALESCE function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gross Sales = COALESCE([Gross Sales], 0)&lt;BR /&gt;This may ensures that even if there is no sales data for a specific Source, Date, and Customer combination, the measure returns 0 instead of BLANK(), thus including the row in the output.&lt;BR /&gt;Refer the &lt;A href="https://learn.microsoft.com/en-us/dax/coalesce-function-dax" target="_self"&gt;link&lt;/A&gt; for detailed understanding&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;If this post helps, please give us &lt;STRONG&gt;Kudos&lt;/STRONG&gt; and consider &lt;STRONG&gt;Accept it as solution&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 07:07:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4604585#M661</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-11T07:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric Notebook not performing calculations on some data in a semantic model</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4609970#M667</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="412811" data-lia-user-login="Neka" class="lia-mention lia-mention-user"&gt;Neka&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your answer and Accept it as answer. It would be greatly appreciated by others in the community who may have the same question&lt;BR /&gt;&lt;BR /&gt;Thank you for being a valued member of the Microsoft Fabric Community Forum!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 10:11:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4609970#M667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-14T10:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric Notebook not performing calculations on some data in a semantic model</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4615641#M677</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="412811" data-lia-user-login="Neka" class="lia-mention lia-mention-user"&gt;Neka&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;May I ask if you have gotten this issue resolved?&lt;BR /&gt;If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.&lt;BR /&gt;&lt;BR /&gt;Thank you for being a valued member of the Microsoft Fabric Community Forum!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 05:15:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4615641#M677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-03-19T05:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fabric Notebook not performing calculations on some data in a semantic model</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4616493#M685</link>
      <description>&lt;P&gt;In case anyone comes across the same issue, I had a call with a Microsoft agent and he suggested using the following code in my notebook before performing any functions:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;fabric.refresh_dataset(dataset="your_dataset", workspace="workspace_name")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It has been working so far. Hope this helps!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Mar 2025 13:40:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Fabric-Notebook-not-performing-calculations-on-some-data-in-a/m-p/4616493#M685</guid>
      <dc:creator>Neka</dc:creator>
      <dc:date>2025-03-19T13:40:28Z</dc:date>
    </item>
  </channel>
</rss>

