• 0

# Calculate A Percentage

Go to solution Solved by Jan,

## Question

Hello;

I am working with a report and aggregate functions.

I am trying to get a percentage toward a goal.

((COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT]) / (MIN [@pUser_QFGoalWeek]))

Should result in a percentage for completed QuotesFinished to QuotesFinishedPerWeekGoal, but it results in zero.

For diagnostic purposes I've checked the following formulas...

COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT] = 2 (correct)

(MIN [@pUser_QFGoalWeek])) = 10 (correct)

((MIN [@pUser_QFGoalWeek]) / (COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT])) = 500.00% (correct)

((COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT]) / (MIN [@pUser_QFGoalWeek])) = 0.00% (incorrect)

Can anyone spot what I'm doing wrong?

Thank You!

## Recommended Posts

• 0
• Solution

Hello EIQ,

As far as I know, aggregate functions cannot work with several fields. I mean, COUNT_NON_BLANK [@tblActionLog_ActionCompletionDT]) / (MIN [@pUser_QFGoalWeek] is the same as COUNT_NON_BLANK / MIN and this formula is applied to all fields that are added to the right-hand panel.

If I understand correctly, the DataType of your pUser_QFGoalWeek field is Text255 or Integer. If you change the DataType to Number/General, the result should be 500% but note that values of the same field are counted as "non blank".

##### Share on other sites
• 0

Awesome!

I changed the Goals to General Numbers, the aggregate to COUNT, and used record filtering to account for blanks.

Thanks!

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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