<?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: dax measure on fabric notebook - fabric.evaluate_measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4922006#M186830</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="854852" data-lia-user-login="thisanco" class="lia-mention lia-mention-user"&gt;thisanco&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes this behavior is expected when you migrate a semantic model from import to dual mode.&lt;/P&gt;&lt;P&gt;• In import mode, all data is cached in memory, so `fabric.evaluate_measure` can freely apply `groupby_columns` and `filters`.&lt;BR /&gt;&lt;BR /&gt;In dual mode, fact tables are queried live using DirectQuery. Grouping and filtering parameters passed through the Python API are not always supported because they must be translated into SQL at the source. As a result, only direct measure evaluation works reliably, e.g.:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;df = fabric.evaluate_measure(&lt;BR /&gt;dataset="database_dual",&lt;BR /&gt;measure="Total"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you need grouping or filtering (such as by `calendar[year]`, `calendar[month]`, `store[id]`), the recommended approach is to define that logic inside the semantic model itself using DAX measures or calculated tables, and then call those measures from your notebook. For example:&lt;/P&gt;&lt;P&gt;TotalByPeriod =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Total],&lt;BR /&gt;VALUES(calendar[year]),&lt;BR /&gt;VALUES(calendar[month]),&lt;BR /&gt;VALUES(store[id])&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then in Python:&lt;/P&gt;&lt;P&gt;df = fabric.evaluate_measure(&lt;BR /&gt;dataset="database_dual",&lt;BR /&gt;measure="TotalByPeriod"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Key takeaway:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;There is no issue with the `fabric.evaluate_measure` library itself — the limitation comes from DirectQuery translation in dual mode. To replicate your import‑mode behavior, move grouping and filtering logic into DAX inside the semantic model, then call those measures from Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Documentation:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/read-write-power-bi-python" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-science/read-write-power-bi-python&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jan 2026 16:46:36 GMT</pubDate>
    <dc:creator>Olufemi7</dc:creator>
    <dc:date>2026-01-20T16:46:36Z</dc:date>
    <item>
      <title>dax measure on fabric notebook - fabric.evaluate_measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4918382#M186751</link>
      <description>&lt;P&gt;I've migrated&amp;nbsp; a semantic model import to a dual mode, now my facts tables are in direct query mode while my dimension are in dual mode.&amp;nbsp; previously in import semantic model I had a measure in my notebook to do a double check with my database source,&lt;BR /&gt;&lt;BR /&gt;df = fabric.evaluate_measure(&lt;BR /&gt;dataset="database_dual",&lt;BR /&gt;measure="Total",&lt;BR /&gt;groupby_columns=[&lt;BR /&gt;"calendar[year]",&lt;BR /&gt;"calendar[month]",&lt;BR /&gt;"store[id]"&lt;BR /&gt;],&lt;BR /&gt;filters={&lt;BR /&gt;"calendar[year]": [2026, 2025, 2024]&lt;BR /&gt;}&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now in semantic model dual mode, this haven't work anymore. It just worked when I query total measure , this measure access the total sale in a fact table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;fabric&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;evaluate_measure&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Total'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;measure&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"Total"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;is there any issue to make a measure&amp;nbsp; using&amp;nbsp;fabric.evaluate_measure library when the model is dual ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Jan 2026 22:06:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4918382#M186751</guid>
      <dc:creator>thisanco</dc:creator>
      <dc:date>2026-01-14T22:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: dax measure on fabric notebook - fabric.evaluate_measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4918462#M186752</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your measure is written the semantic model, but for the first step, before we check the notebook, I think we can try to check if the measures are still working in the power bi report and semantic model. The reason for this is because of the changes to the limited relationship, and some DAX functions does not work as expected when comparing the same DAX measure under strong relationship vs. limited relationship.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/guidance/composite-model-guidance#cross-source-group-relationships?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;Composite model guidance in Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 03:32:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4918462#M186752</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2026-01-15T03:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: dax measure on fabric notebook - fabric.evaluate_measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4918570#M186763</link>
      <description>&lt;P&gt;Yes, the measure is working on dashboard, my idea is to use the same measure on notebook .&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 10:10:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4918570#M186763</guid>
      <dc:creator>thisanco</dc:creator>
      <dc:date>2026-01-15T10:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: dax measure on fabric notebook - fabric.evaluate_measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4921499#M186822</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="854852" data-lia-user-login="thisanco" class="lia-mention lia-mention-user"&gt;thisanco&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;for the prompt response.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is expected behavior with composite models. After switching the model to composite, the relationships between fact and dimension tables become limited. fabric.evaluate_measure runs through the dataset engine and cannot group or filter across limited relationships&lt;/P&gt;
&lt;P&gt;The measure works in power bi visuals because visuals use a different query execution path that can dynamically switch dual tables to import. Notebooks do not use that path.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To use the same logic in a notebook, please use an explicit DAX query for example SUMMARIZECOLUMNS via fabric.evaluate_dax, or keep the required dimensions in Import mode.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jan 2026 06:06:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4921499#M186822</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2026-01-20T06:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: dax measure on fabric notebook - fabric.evaluate_measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4922006#M186830</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="854852" data-lia-user-login="thisanco" class="lia-mention lia-mention-user"&gt;thisanco&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes this behavior is expected when you migrate a semantic model from import to dual mode.&lt;/P&gt;&lt;P&gt;• In import mode, all data is cached in memory, so `fabric.evaluate_measure` can freely apply `groupby_columns` and `filters`.&lt;BR /&gt;&lt;BR /&gt;In dual mode, fact tables are queried live using DirectQuery. Grouping and filtering parameters passed through the Python API are not always supported because they must be translated into SQL at the source. As a result, only direct measure evaluation works reliably, e.g.:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;df = fabric.evaluate_measure(&lt;BR /&gt;dataset="database_dual",&lt;BR /&gt;measure="Total"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you need grouping or filtering (such as by `calendar[year]`, `calendar[month]`, `store[id]`), the recommended approach is to define that logic inside the semantic model itself using DAX measures or calculated tables, and then call those measures from your notebook. For example:&lt;/P&gt;&lt;P&gt;TotalByPeriod =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Total],&lt;BR /&gt;VALUES(calendar[year]),&lt;BR /&gt;VALUES(calendar[month]),&lt;BR /&gt;VALUES(store[id])&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then in Python:&lt;/P&gt;&lt;P&gt;df = fabric.evaluate_measure(&lt;BR /&gt;dataset="database_dual",&lt;BR /&gt;measure="TotalByPeriod"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Key takeaway:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;There is no issue with the `fabric.evaluate_measure` library itself — the limitation comes from DirectQuery translation in dual mode. To replicate your import‑mode behavior, move grouping and filtering logic into DAX inside the semantic model, then call those measures from Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Documentation:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/read-write-power-bi-python" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-science/read-write-power-bi-python&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jan 2026 16:46:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4922006#M186830</guid>
      <dc:creator>Olufemi7</dc:creator>
      <dc:date>2026-01-20T16:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: dax measure on fabric notebook - fabric.evaluate_measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4925956#M186909</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="854852" data-lia-user-login="thisanco" class="lia-mention lia-mention-user"&gt;thisanco&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to&amp;nbsp;check if the solution I have provided for the issue worked?&amp;nbsp;or let us know if you need any further assistance.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jan 2026 11:54:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4925956#M186909</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2026-01-23T11:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: dax measure on fabric notebook - fabric.evaluate_measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4931947#M186968</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/854852" target="_blank"&gt;@thisanco&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We wanted to kindly follow up to&amp;nbsp;check if the solution I have provided for the issue worked?&amp;nbsp;or let us know if you need any further assistance.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 12:46:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-measure-on-fabric-notebook-fabric-evaluate-measure/m-p/4931947#M186968</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2026-01-27T12:46:45Z</dc:date>
    </item>
  </channel>
</rss>

