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

Hello,

 

Anyone can help me how i can use first obs and obs option in SAS Visual Analytics in Query builder?

 

Thanks in Advance.

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

"Query Builder" utilises SQL technology.  SQL does not have any concept of first and last, nor in fact of observation order.  You must logically find a certain row.  So for instance if in a datastep you had first and last of dates within ID, and they were sorted sequentially and they were unique, the "first" row would logically be identified by date=min(date) group by id.  The "last" record would be logically identified by date=max(date) group by id.  It is irrelevant to the SQL parser if the "last" record appears as first, or second or anywhere in the data, only logical identification is used.

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

"Query Builder" utilises SQL technology.  SQL does not have any concept of first and last, nor in fact of observation order.  You must logically find a certain row.  So for instance if in a datastep you had first and last of dates within ID, and they were sorted sequentially and they were unique, the "first" row would logically be identified by date=min(date) group by id.  The "last" record would be logically identified by date=max(date) group by id.  It is irrelevant to the SQL parser if the "last" record appears as first, or second or anywhere in the data, only logical identification is used.

Laxesh7
Fluorite | Level 6
Thankyou for your answer.

This will help me i am sure.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1123 views
  • 1 like
  • 2 in conversation