Forum Discussion
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.
- Anonymous2 years ago
Hi rafaelfreitas ,
You can try adjusting the decimal places of the [% Detratores] measure to see the results again.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- Ritaf1983
Super User
Hi rafaelfreitas
Please share some data to work withPlease provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - AnonymousNot applicable
Hi rafaelfreitas ,
You can try adjusting the decimal places of the [% Detratores] measure to see the results again.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.