<?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: Create a measure from a variable table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836796#M39136</link>
    <description>&lt;P&gt;There are plenty of other ways to do it too. E.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUMX ( tabla, IF ( [nº values] &amp;gt;= 3, 1, 0 ) )&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 11 May 2021 17:41:01 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2021-05-11T17:41:01Z</dc:date>
    <item>
      <title>Create a measure from a variable table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836688#M39125</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to complete one of my needed measures.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My direct query table contains this structure:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;users&lt;/TD&gt;&lt;TD&gt;steps&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;NEW&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;NEW&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;NEW&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;OLD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;OLD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;OLD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;EQUAL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;EQUAL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;EQUAL&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a measure to distincount the number of users that has &lt;U&gt;3 times "NEW"&lt;/U&gt; in the "step" column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to create a calculated column because I am working with Direct Query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, the furthest that I have got is creating a variable table where seems like this:&lt;/P&gt;&lt;P&gt;VAR tabla =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS(VALUES(table[users]),"nº values", CALCULATE(COUNT(table[steps]),segment_flatten[event] = "NEW")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;users&lt;/TD&gt;&lt;TD&gt;nº values = NEW in steps&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have this measure to be equal = 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:52:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836688#M39125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-11T16:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure from a variable table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836716#M39130</link>
      <description>&lt;P&gt;Count the number of rows where "&lt;SPAN&gt;nº values" is three or greater.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;COUNTROWS ( FILTER ( tabla, [nº values] &amp;gt;= 3 ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:59:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836716#M39130</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-05-11T16:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure from a variable table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836723#M39131</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try the below for creating a new table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;VAR Tables =&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;ADDCOLUMNS (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VALUES ( 'Table'[users] ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"@values",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CALCULATE ( DISTINCTCOUNT ( 'Table'[users] ), 'Table'[steps] = "NEW" ) + 0&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;STRONG&gt;Hi, My name is Jihwan Kim. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;STRONG&gt;If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;Linkedin: linkedin.com/in/jihwankim1975/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;Twitter: twitter.com/Jihwan_JHKIM&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 17:02:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836723#M39131</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-05-11T17:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure from a variable table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836728#M39132</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;I just want to scream&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been toying with several options, I didn't think about this possibility.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 17:05:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836728#M39132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-11T17:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure from a variable table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836741#M39133</link>
      <description>&lt;P&gt;Thanks for your quick answer Jihwan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing here is that I didn´t want to create a new table, just a variable table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you anyways &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 17:07:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836741#M39133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-11T17:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create a measure from a variable table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836796#M39136</link>
      <description>&lt;P&gt;There are plenty of other ways to do it too. E.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUMX ( tabla, IF ( [nº values] &amp;gt;= 3, 1, 0 ) )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 May 2021 17:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-measure-from-a-variable-table/m-p/1836796#M39136</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-05-11T17:41:01Z</dc:date>
    </item>
  </channel>
</rss>

