<?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 code from power bi performance analyzer doesn't work when put into power automate flow. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Dax-code-from-power-bi-performance-analyzer-doesn-t-work-when/m-p/3863535#M51946</link>
    <description>&lt;P&gt;When you borrow DAX code from Power BI visuals you don't want to have totals. Disable them and you will see the code becomes much simpler.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// DAX Query
EVALUATE
  VAR __DS0FilterTable = 
    TREATAS(
      {"Armadillo",
        "Director",
        "Essentials",
        "Kickstart",
        "Plus",
        "Standard",
        "Umbrella"},
      'si_membership'[Grade]
    )

 

  VAR __DS0FilterTable2 = 
    TREATAS({"Valid",
      "Pending Cancelled"}, 'si_membership'[Subscription Status])

 

RETURN SUMMARIZECOLUMNS(
      'Calendar PQ'[Week number (month)],
      'si_membership'[Grade],
      __DS0FilterTable,
      __DS0FilterTable2,
      "Count_of_Subscription", [Count of Subscription]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2024 20:53:17 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-04-23T20:53:17Z</dc:date>
    <item>
      <title>Dax code from power bi performance analyzer doesn't work when put into power automate flow.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dax-code-from-power-bi-performance-analyzer-doesn-t-work-when/m-p/3862268#M51936</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to have power automate export a particular matrix table and and save it into sharepoint. I have created the flow but the code i am pasting for the matrix i need exporting doesnt work. Im not sure how as i used&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;performance analyser and recorded the tables being refreshed to get the code.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Any help would be great&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I am trying to replicate this in an exported excel document with the DAX code below&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MrAtkinson_0-1713874537695.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1084371iD93C72D37FB3CF2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MrAtkinson_0-1713874537695.png" alt="MrAtkinson_0-1713874537695.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// DAX Query&lt;BR /&gt;DEFINE&lt;BR /&gt;  VAR __DS0FilterTable =&amp;nbsp;&lt;BR /&gt;    TREATAS(&lt;BR /&gt;      {"Armadillo",&lt;BR /&gt;        "Director",&lt;BR /&gt;        "Essentials",&lt;BR /&gt;        "Kickstart",&lt;BR /&gt;        "Plus",&lt;BR /&gt;        "Standard",&lt;BR /&gt;        "Umbrella"},&lt;BR /&gt;      'si_membership'[Grade]&lt;BR /&gt;    )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  VAR __DS0FilterTable2 =&amp;nbsp;&lt;BR /&gt;    TREATAS({"Valid",&lt;BR /&gt;      "Pending Cancelled"}, 'si_membership'[Subscription Status])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  VAR __DS0Core =&amp;nbsp;&lt;BR /&gt;    SUMMARIZECOLUMNS(&lt;BR /&gt;      ROLLUPADDISSUBTOTAL('Calendar PQ'[Week number (month)], "IsGrandTotalRowTotal"),&lt;BR /&gt;      ROLLUPADDISSUBTOTAL('si_membership'[Grade], "IsGrandTotalColumnTotal"),&lt;BR /&gt;      __DS0FilterTable,&lt;BR /&gt;      __DS0FilterTable2,&lt;BR /&gt;      "Count_of_Subscription", 'Tenure calculations'[Count of Subscription]&lt;BR /&gt;    )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  VAR __DS0PrimaryWindowed =&amp;nbsp;&lt;BR /&gt;    TOPN(&lt;BR /&gt;      102,&lt;BR /&gt;      SUMMARIZE(__DS0Core, 'Calendar PQ'[Week number (month)], [IsGrandTotalRowTotal]),&lt;BR /&gt;      [IsGrandTotalRowTotal],&lt;BR /&gt;      0,&lt;BR /&gt;      'Calendar PQ'[Week number (month)],&lt;BR /&gt;      1&lt;BR /&gt;    )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  VAR __DS0SecondaryBase =&amp;nbsp;&lt;BR /&gt;    SUMMARIZE(__DS0Core, 'si_membership'[Grade], [IsGrandTotalColumnTotal])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  VAR __DS0Secondary =&amp;nbsp;&lt;BR /&gt;    TOPN(102, __DS0SecondaryBase, [IsGrandTotalColumnTotal], 1, 'si_membership'[Grade], 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  VAR __DS0BodyLimited =&amp;nbsp;&lt;BR /&gt;    NATURALLEFTOUTERJOIN(&lt;BR /&gt;      __DS0PrimaryWindowed,&lt;BR /&gt;      SUBSTITUTEWITHINDEX(&lt;BR /&gt;        __DS0Core,&lt;BR /&gt;        "ColumnIndex",&lt;BR /&gt;        __DS0Secondary,&lt;BR /&gt;        [IsGrandTotalColumnTotal],&lt;BR /&gt;        ASC,&lt;BR /&gt;        'si_membership'[Grade],&lt;BR /&gt;        ASC&lt;BR /&gt;      )&lt;BR /&gt;    )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;  __DS0Secondary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ORDER BY&lt;BR /&gt;  [IsGrandTotalColumnTotal], 'si_membership'[Grade]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;  __DS0BodyLimited&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ORDER BY&lt;BR /&gt;  [IsGrandTotalRowTotal] DESC, 'Calendar PQ'[Week number (month)], [ColumnIndex]&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;has context menu&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 12:15:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dax-code-from-power-bi-performance-analyzer-doesn-t-work-when/m-p/3862268#M51936</guid>
      <dc:creator>MrAtkinson</dc:creator>
      <dc:date>2024-04-23T12:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dax code from power bi performance analyzer doesn't work when put into power automate flow.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dax-code-from-power-bi-performance-analyzer-doesn-t-work-when/m-p/3863535#M51946</link>
      <description>&lt;P&gt;When you borrow DAX code from Power BI visuals you don't want to have totals. Disable them and you will see the code becomes much simpler.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// DAX Query
EVALUATE
  VAR __DS0FilterTable = 
    TREATAS(
      {"Armadillo",
        "Director",
        "Essentials",
        "Kickstart",
        "Plus",
        "Standard",
        "Umbrella"},
      'si_membership'[Grade]
    )

 

  VAR __DS0FilterTable2 = 
    TREATAS({"Valid",
      "Pending Cancelled"}, 'si_membership'[Subscription Status])

 

RETURN SUMMARIZECOLUMNS(
      'Calendar PQ'[Week number (month)],
      'si_membership'[Grade],
      __DS0FilterTable,
      __DS0FilterTable2,
      "Count_of_Subscription", [Count of Subscription]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 20:53:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dax-code-from-power-bi-performance-analyzer-doesn-t-work-when/m-p/3863535#M51946</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-23T20:53:17Z</dc:date>
    </item>
  </channel>
</rss>

