BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
new_sas_user_4
Obsidian | Level 7

@andreas_lds thank you 🙂

There is something I have come across and I thought you might help !!

The dataset 'have' sometimes has missing values.

eg there no row that comes up for Day 30(which in my sample dataset is 30 0.01 30May2020 )

and because of the missing percent value, I get a random number in the results for 30June2020 Orders1

I believe it is because of the informat value for Day2Percent30 is missing. 

Is there a way to rectify this?

 

I tried using coalesce function 

_p = coalesce(input(cats(_z),Day2Percent.),0);            but it didnt help.

 

 

_p = input(cats(_z), Day2Percent.);
			_o = input(cats(_i), Day2Orders.);
			allOrders[_i] = int(_o * _p);

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 15 replies
  • 2643 views
  • 0 likes
  • 4 in conversation