
1. Re: Counting the no.of Accounts whose sales is greater than zero
Ayeesha Farheen Feb 1, 2017 5:22 AM (in response to Ayeesha Farheen)I am using the below formula to calculate the count:
IIF(Sales>0,countd(Account,0),0)
Output: 3
Correct output should be : 2

2. Re: Counting the no.of Accounts whose sales is greater than zero
Andrew Watson Feb 1, 2017 5:28 AM (in response to Ayeesha Farheen)Another solution is: IF { FIXED [City],[Account]:SUM([Sales])} > 0 THEN 1 END. You would sum that calculated field to get the result.

3. Re: Counting the no.of Accounts whose sales is greater than zero
Dhruv Gupta Feb 1, 2017 5:32 AM (in response to Ayeesha Farheen)Hi Ayesha,
Can you attach the package so that the forum participants get exact data type while accessing the data.
thanks,
Dhruv

4. Re: Counting the no.of Accounts whose sales is greater than zero
Ayeesha Farheen Feb 1, 2017 5:52 AM (in response to Dhruv Gupta)Hi Dhruv,
Thanks for your reply.Data is confidential hence i cant share it. Please let me know if you need more information.
@Andrew,
Thanks for your reply. With the help of your reply i could understood the concept of fixed but it is still not giving me the desired result.

5. Re: Counting the no.of Accounts whose sales is greater than zero
Faris Ahamad M Feb 1, 2017 5:52 AM (in response to Ayeesha Farheen)Hi Ayeesha,
try:
COUNTD(
if [Sales]>0
then([Account])
END
)

6. Re: Counting the no.of Accounts whose sales is greater than zero
Andrew Watson Feb 1, 2017 5:57 AM (in response to Ayeesha Farheen)Please provide a screenshot so we can see how you're using it.

8. Re: Counting the no.of Accounts whose sales is greater than zero
Ayeesha Farheen Feb 1, 2017 6:11 AM (in response to Andrew Watson)Hi All,
Thanks for all your reply. I got the solution. Problem was at the back end data. It had few nulls because of which i was getting wrong result.
Appreciate all of you for sharing your time and thoughts.
Thanks,
Ayeesha

9. Re: Counting the no.of Accounts whose sales is greater than zero
Faris Ahamad M Feb 1, 2017 6:29 AM (in response to Ayeesha Farheen)Hi Ayeesha,
Can you please explain what was the exact problem with the back end data.?
Because I tried using your calculation :
existing solution:
IIF(SUM([Sales])>0,countd([Account]),0)
And got the same error output as yours.
Then i used my calculation :
No of accounts :
COUNTD(
if [Sales]>0
then([Account])
END
)
and it worked as per your requirement.