Jump to content
  • 0

SQL count calculation issue


LynnR

Question

Hi.

I have a few SQL calculations that is counting data from my tables and views and giving me a number value. The problem is when calculation cannot find any results i always get a $0 insted of a clean 0 number value. how do i set this up the right way? This also only happens if i have not been assigned any projects. If you look at the picture you see what happens when i log in with nothing assigned..

SELECT COUNT
     (DISTINCT Projects_ProjectID)
FROM
     _v_Customer_addNotesToProjects 
WHERE
     Projects_Assigned_staff = '[@authfield:Users_UserID]' 
AND
     Project_Notes_Viewed = 'False'

calcerror.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 4/11/2019 at 4:10 PM, Vitalikssssss said:

Hi @LynnR,

I would assume that your calculated field has currency formatting applied.

Make sure that your calculated field formatting set to "None" in order to remove currency sign.

871127afa8ca.png

Hope this helps.

Regards,

vitalikssssss

Hi, thanks for your suggestion, but my calculated fields already have the formatting set to none.

What i am trying to do is just count how many new follow-ups, projects and project comments that is assigned to one user. If you have the correct syntax to count these values and to show 0 when there is no values found it would be a great help.. 

 

image.png.1db4bfd5f3356a8f8f96e79574b0a599.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...