Forum Discussion

rafaelfreitas's avatar
rafaelfreitas
New Member
2 years ago
Solved

Division between two measure results returns zero

Hello, I am working on a NPS dashboard and I'm working with the current scenario: I have two measures. One is counting the number of surveys and returning the total of answered surveys, displayed below:

 

 

 

QtdRespondida = calculate(countrows('BASE DE PESQUISA'), 'BASE DE PESQUISA'[RespondeuPerguntaOperador]="True")

 

 

 

A second measure counts the total of responses by their class on a different column that classifies the responses by their score. E.g, Response of 0-6 equals a "Detractor". This measure will count the number of, say, detractors, and return a value. Formula below:

 

 

 

# Detratores = calculate(countrows('BASE DE PESQUISA'), 'BASE DE PESQUISA'[ClassificaçaoNPS]="Detrator")

 

 

 

A third measure simply divides both measures to return the percentage of detractors/promoters/neutrals.

 

 

 

% Detratores = DIVIDE([# Detratores], [QtdRespondida])

 

 

 

The first two measures are working fine. I've tested them by adding to a simple card and they are displaying the counted values just well. But when I try to divide both measures, it always results in 0.

 

 

 Thanks in advance to the responses.

2 Replies