NOTE: Mathematical operations could not be performed

Solved
Occasional Contributor
Posts: 19

NOTE: Mathematical operations could not be performed

[ Edited ]

data NRI_team;
/*retain TEAM ACCOUNTS_OPENED_LAST_MONTH C2T_till_date_for_last_month C2T_for_the_month */
set vinod.Nri_team_wise_conversation;
C2T_for_the_month=C2T_till_date_for_last_month/ACCOUNTS_OPENED_LAST_MONTH*100;
C2T_for_the_current_year=Accounts_C2T_current_year/Accounts_current_year*100;
format C2T_for_the_month percent8.2;
format C2T_for_the_current_year percent8.2;

run;

log file::::::::::::::

182 data NRI_team;
183 /*retain TEAM ACCOUNTS_OPENED_LAST_MONTH C2T_till_date_for_last_month C2T_for_the_month */
185 set vinod.Nri_team_wise_conversation;
186 C2T_for_the_month=C2T_till_date_for_last_month/ACCOUNTS_OPENED_LAST_MONTH*100;
187 C2T_for_the_current_year=Accounts_C2T_current_year/Accounts_current_year*100;
188 format C2T_for_the_month percent8.2;
189 format C2T_for_the_current_year percent8.2;
190
191 run;

NOTE: Division by zero detected at line 186 column 47.
NOTE: Division by zero detected at line 187 column 51.
TEAM=IBG OTHERS ACCOUNTS_OPENED_LAST_MONTH=0 C2T_till_date_for_last_month=0 Accounts_current_year=0
C2T_for_the_current_year=. _ERROR_=1 _N_=1
NOTE: Division by zero detected at line 186 column 47.
NOTE: Division by zero detected at line 187 column 51.
TEAM=QATAR ACCOUNTS_OPENED_LAST_MONTH=0 C2T_till_date_for_last_month=0 Accounts_current_year=0
C2T_for_the_current_year=. _ERROR_=1 _N_=7
NOTE: Mathematical operations could not be performed at the following places. The results of the
operations have been set to missing values.
Each place is given by: (Number of times) at (Line)Column).
2 at 186:47 2 at 187:51
NOTE: There were 11 observations read from the data set VINOD.NRI_TEAM_WISE_CONVERSATION.
NOTE: The data set WORK.NRI_TEAM has 11 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds

this is error occuring

Mathematical operations could not be performed at the following places. The results of the
operations have been set to missing values.

values missing in the dataset and calculations was not performed showing error and wd use

Accepted Solutions
Solution
‎06-10-2017 08:55 AM
PROC Star
Posts: 8,150

Re: BASE SAS

You are trying to divide a couple of numbers by avariables that have a value of 0.

You would have to show some example data of what you have, what you want to do with that data, and the file you want as a result (based on that example data).

Art, CEO, AnalystFinder.com

All Replies
Solution
‎06-10-2017 08:55 AM
PROC Star
Posts: 8,150

Re: BASE SAS

You are trying to divide a couple of numbers by avariables that have a value of 0.

You would have to show some example data of what you have, what you want to do with that data, and the file you want as a result (based on that example data).

Art, CEO, AnalystFinder.com

SAS Super FREQ
Posts: 497

Re: BASE SAS

http://support.sas.com/kb/19/965.html

Try the DIVIDE function rather than '/'.

Super User
Posts: 23,342

Re: BASE SAS

1. This is not an Error, it's a Note. It tells you something may be wrong.

2. Error is clear:

Note: Division by zero detected at line 186 column 47

3. Check Line 186

Fix line in question and repeat until all Notes are either acceptable or gone.

vinod4842 wrote:

data NRI_team;
/*retain TEAM ACCOUNTS_OPENED_LAST_MONTH C2T_till_date_for_last_month C2T_for_the_month */
set vinod.Nri_team_wise_conversation;
C2T_for_the_month=C2T_till_date_for_last_month/ACCOUNTS_OPENED_LAST_MONTH*100;
C2T_for_the_current_year=Accounts_C2T_current_year/Accounts_current_year*100;
format C2T_for_the_month percent8.2;
format C2T_for_the_current_year percent8.2;

run;

log file::::::::::::::

182 data NRI_team;
183 /*retain TEAM ACCOUNTS_OPENED_LAST_MONTH C2T_till_date_for_last_month C2T_for_the_month */
185 set vinod.Nri_team_wise_conversation;
186 C2T_for_the_month=C2T_till_date_for_last_month/ACCOUNTS_OPENED_LAST_MONTH*100;
187 C2T_for_the_current_year=Accounts_C2T_current_year/Accounts_current_year*100;
188 format C2T_for_the_month percent8.2;
189 format C2T_for_the_current_year percent8.2;
190
191 run;

NOTE: Division by zero detected at line 186 column 47.
NOTE: Division by zero detected at line 187 column 51.
TEAM=IBG OTHERS ACCOUNTS_OPENED_LAST_MONTH=0 C2T_till_date_for_last_month=0 Accounts_current_year=0
C2T_for_the_current_year=. _ERROR_=1 _N_=1
NOTE: Division by zero detected at line 186 column 47.
NOTE: Division by zero detected at line 187 column 51.
TEAM=QATAR ACCOUNTS_OPENED_LAST_MONTH=0 C2T_till_date_for_last_month=0 Accounts_current_year=0
C2T_for_the_current_year=. _ERROR_=1 _N_=7
NOTE: Mathematical operations could not be performed at the following places. The results of the
operations have been set to missing values.
Each place is given by: (Number of times) at (Line)Column).
2 at 186:47 2 at 187:51
NOTE: There were 11 observations read from the data set VINOD.NRI_TEAM_WISE_CONVERSATION.
NOTE: The data set WORK.NRI_TEAM has 11 observations and 9 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds

this is error occuring

Mathematical operations could not be performed at the following places. The results of the
operations have been set to missing values.

values missing in the dataset and calculations was not performed showing error and wd use

☑ This topic is solved.