Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, first of all sorry if this is a very noob question but I'm with it two hours and I'm desperate.
I have a variable called NPS. I'm drawing a graph with the dimension Months and in the expression I want to add the NPS formula
(Count(NPS>8)-Count(NPS<7)/Count(NPS>=0))*100
The problem is that all the count provides me the same value that is the number of NPS values.
For example in January:
Count(NPS>8) = 1133
Count(NPS>0) = 1133
Count(NPS<7) = 1133
In NPS properties I have changed in the Number TAB the configuration to Integer.
Thanks in advance for your support.
Regards
NPS>8 will evaluate to -1 (true) or 0 (false). Both these values will be counted by Count(). If you want to use a condition inside your Count() you need to use
Count( If(NPS>8,NPS,Null()) )
or
Count( {$<NPS={">8"}>} NPS )
Long story short: Marcus' expression will work.
HIC
Maybe so:
(count({< NPS = {">8"}>} NPS) - count({< NPS = {"<8"}>} NPS)) / count({< NPS = {">=0"}>} NPS) * 100
- Marcus
NPS>8 will evaluate to -1 (true) or 0 (false). Both these values will be counted by Count(). If you want to use a condition inside your Count() you need to use
Count( If(NPS>8,NPS,Null()) )
or
Count( {$<NPS={">8"}>} NPS )
Long story short: Marcus' expression will work.
HIC
Thanks very much for your answer for both the right answer and take your time for the explanation. I really appreciate your support.
Thanks and I hope to return the favor some day
Regards
Javi
-(Sum(NPS>8)+Sum(NPS<7)/Sum(NPS>=0))*100
might also work.
hope this helps
regards
Marco