cancel
Showing results for
Did you mean:
Frequent Visitor

## How to Count value in a table with measure.

Hi im new in DAX and have the next situation,

I have a table with 5 columns:

• Nombre_Establecimiento
• Ventas Periodo Anterior =
• Ventas Periodo Seleccionado =
• %_Crecimiento_Ventas =
• Incremento_Ventas =
IF([%_Crecimiento_Ventas]>0;"SI";"NO")

The last 4 columns are measures.  This measures are showing sales of each business of this year and the last year.  With this information im calculating the % of increase in sales (%_Crecimiento_Ventas).  In the last column i put a conditional measure that evaluate if the % is greates than 0 then show "SI" if not show "NO"

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.  for example in this table i need to show 4 business that increase sales.

Someone can help me with this trouble?

Thanks for your help

1 ACCEPTED SOLUTION
Anonymous
Not applicable
```-- First, you should use DIVIDE instead of /

%_Crecimiento_Ventas =
var __Ventas_Periodo_Anterior = [Ventas_Periodo_Anterior]
return
divide(
__Ventas_Periodo_Anterior
)

-- And this is (most likely) what you need:

[# Businesses With SI] =
var __businesses = VALUES( Establecimientos[Nombre_Establecimiento] )
filter(
[Incremento_Ventas] = "SI"
)
return

Best

Darek

2 REPLIES 2
Anonymous
Not applicable
```-- First, you should use DIVIDE instead of /

%_Crecimiento_Ventas =
var __Ventas_Periodo_Anterior = [Ventas_Periodo_Anterior]
return
divide(
__Ventas_Periodo_Anterior
)

-- And this is (most likely) what you need:

[# Businesses With SI] =
var __businesses = VALUES( Establecimientos[Nombre_Establecimiento] )
filter(
[Incremento_Ventas] = "SI"
)
return

Best

Darek

Frequent Visitor

Thanks Darlove.

It worked perfect!!!

Regards

Announcements

#### Manage your user group events

Check out the News & Announcements to learn more.

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Top Solution Authors
Top Kudoed Authors