<?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 How to Count value in a table with measure. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Count-value-in-a-table-with-measure/m-p/742178#M2321</link>
    <description>&lt;P&gt;Hi im new in DAX and have the next situation,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 5 columns:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Nombre_Establecimiento&lt;/LI&gt;&lt;LI&gt;Ventas Periodo Anterior =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE([Ventas_Periodo_Seleccionado];SAMEPERIODLASTYEAR('Calendar'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Ventas Periodo Seleccionado =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(SUM(Empresario_Indicadores_Cuantita[Ventas]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;%_Crecimiento_Ventas =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(([Ventas_Periodo_Seleccionado]-[Ventas_Periodo_Anterior])/[Ventas_Periodo_Anterior])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Incremento_Ventas =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF([%_Crecimiento_Ventas]&amp;gt;0;"SI";"NO")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The last 4 columns are measures.&amp;nbsp; This measures are showing sales of each business of this year and the last year.&amp;nbsp; With this information im calculating the % of increase in sales (%_Crecimiento_Ventas).&amp;nbsp; In the last column i put a conditional measure that evaluate if the % is greates than 0 then show "SI" if not show "NO"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to count on the number of business that increased sales, (it mean Incremento_Ventas = SI), and show this value in a card visualization.&amp;nbsp; for example in this table i need to show 4 business that increase sales.&amp;nbsp;&lt;/SPAN&gt;&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;SPAN&gt;Someone can help me with this trouble?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2019 12:56:54 GMT</pubDate>
    <dc:creator>Nestor_Moreno</dc:creator>
    <dc:date>2019-07-17T12:56:54Z</dc:date>
    <item>
      <title>How to Count value in a table with measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Count-value-in-a-table-with-measure/m-p/742178#M2321</link>
      <description>&lt;P&gt;Hi im new in DAX and have the next situation,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 5 columns:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Nombre_Establecimiento&lt;/LI&gt;&lt;LI&gt;Ventas Periodo Anterior =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE([Ventas_Periodo_Seleccionado];SAMEPERIODLASTYEAR('Calendar'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Ventas Periodo Seleccionado =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(SUM(Empresario_Indicadores_Cuantita[Ventas]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;%_Crecimiento_Ventas =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(([Ventas_Periodo_Seleccionado]-[Ventas_Periodo_Anterior])/[Ventas_Periodo_Anterior])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Incremento_Ventas =&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF([%_Crecimiento_Ventas]&amp;gt;0;"SI";"NO")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The last 4 columns are measures.&amp;nbsp; This measures are showing sales of each business of this year and the last year.&amp;nbsp; With this information im calculating the % of increase in sales (%_Crecimiento_Ventas).&amp;nbsp; In the last column i put a conditional measure that evaluate if the % is greates than 0 then show "SI" if not show "NO"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to count on the number of business that increased sales, (it mean Incremento_Ventas = SI), and show this value in a card visualization.&amp;nbsp; for example in this table i need to show 4 business that increase sales.&amp;nbsp;&lt;/SPAN&gt;&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;SPAN&gt;Someone can help me with this trouble?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 12:56:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Count-value-in-a-table-with-measure/m-p/742178#M2321</guid>
      <dc:creator>Nestor_Moreno</dc:creator>
      <dc:date>2019-07-17T12:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count value in a table with measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Count-value-in-a-table-with-measure/m-p/742617#M2347</link>
      <description>&lt;PRE&gt;-- First, you should use DIVIDE instead of /

%_Crecimiento_Ventas = 
var __Ventas_Periodo_Seleccionado = [Ventas_Periodo_Seleccionado]
var __Ventas_Periodo_Anterior = [Ventas_Periodo_Anterior]
return
	divide(
		__Ventas_Periodo_Seleccionado - __Ventas_Periodo_Anterior,
		__Ventas_Periodo_Anterior
	)

-- And this is (most likely) what you need:

[# Businesses With SI] =
var __businesses = VALUES( Establecimientos[Nombre_Establecimiento] )
var __businessesWithSI =
	filter(
		__businesses,
		[Incremento_Ventas] = "SI"
	)
var __countOfbusinessesWithSI =
	countrows( __businessesWithSI )
return
	__countOfbusinessesWithSI&lt;/PRE&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 21:14:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Count-value-in-a-table-with-measure/m-p/742617#M2347</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-17T21:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Count value in a table with measure.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Count-value-in-a-table-with-measure/m-p/743431#M2379</link>
      <description>&lt;P&gt;Thanks Darlove.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked perfect!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 12:57:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Count-value-in-a-table-with-measure/m-p/743431#M2379</guid>
      <dc:creator>Nestor_Moreno</dc:creator>
      <dc:date>2019-07-18T12:57:16Z</dc:date>
    </item>
  </channel>
</rss>

