BookmarkSubscribeRSS Feed
Dreamer
Obsidian | Level 7

Hi,

I'm using SAS VA 7.3.

 

I've created an Aggregated measure.

But If one of my measure's value is missing then aggregated formula is also returning a missing value.

 

In base SAS we can use Sum(var1,var2) function to avoid this problem.

But in VA it is giving me syntax error.

 

What should I modify in this formula to add numbers with missing value?

Sum [_ByGroup_] ('M1'n) / ( Sum [_ByGroup_] ('M2'n) + Sum [_ByGroup_] ('M3'n) )

 

 

Any suggestion?

 

3 REPLIES 3
FredrikE
Rhodochrosite | Level 12

Maybe if you use max()?

max('M1'n,0)

max('M2'n,0)

...

//Fredrik

Dreamer
Obsidian | Level 7

Thanks @FredrikE I tried but It didn't work.
I tried Sum [_ByGroup_] (max('C_B7'n))  but then got "Unknown Error" message.

Dreamer
Obsidian | Level 7

Btw for a quick fix I replaced all missing values to 0 (zero).

It worked for now.

But I'll be looking for a good solution of this problem.

I'm sure there should be some way to negate missing value effect.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1709 views
  • 0 likes
  • 2 in conversation