<?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 Other methods than pivoting tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-methods-than-pivoting-tables/m-p/1959463#M42809</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to count each variable based on the value I have pivoted the table below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Into:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just parts of all the data. I tried to make the pivot on all of the dataset but I stopped the process when it reached 2,5 millions rows.&lt;/P&gt;&lt;P&gt;Is there any ways to do this without pivoting the table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 09:13:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-15T09:13:30Z</dc:date>
    <item>
      <title>Other methods than pivoting tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-methods-than-pivoting-tables/m-p/1959463#M42809</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to count each variable based on the value I have pivoted the table below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Into:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just parts of all the data. I tried to make the pivot on all of the dataset but I stopped the process when it reached 2,5 millions rows.&lt;/P&gt;&lt;P&gt;Is there any ways to do this without pivoting the table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 09:13:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-methods-than-pivoting-tables/m-p/1959463#M42809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-15T09:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Other methods than pivoting tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-methods-than-pivoting-tables/m-p/1959559#M42814</link>
      <description>&lt;P&gt;Of course, there is. There always is. Create a cross-join table with this makeup:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value|VariableName&lt;/P&gt;&lt;P&gt;----------------------&lt;/P&gt;&lt;P&gt;failed|Var1&lt;/P&gt;&lt;P&gt;not_tested|Var1&lt;/P&gt;&lt;P&gt;passed|Var1&lt;/P&gt;&lt;P&gt;failed|Var2&lt;/P&gt;&lt;P&gt;... and so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is a disconnected table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then create a measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Status Count] =
CALCULATE(
	SUMX(
		SUMMARIZE(
			T,
			T[Value],
			T[VariableName]
		),
		var Status_ = T[Value]
		var VarName = T[VariableName]
		return
		switch( VarName,
			"Var1",
				CALCULATE(
					COUNTROWS( YourTable ),
					KEEPFILTERS(
						YourTable[Var1] = Status_
					)
				),
			"Var2",
				CALCULATE(
					COUNTROWS( YourTable ),
					KEEPFILTERS(
						YourTable[Var2] = Status_
					)
				),
			// ... and so on in the same fashion...
		)
	)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 09:55:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-methods-than-pivoting-tables/m-p/1959559#M42814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-15T09:55:53Z</dc:date>
    </item>
  </channel>
</rss>

