BookmarkSubscribeRSS Feed
samstheway79
Fluorite | Level 6

Hi All

I have been given a requirement where a business logic has to be executed on the fly on the basis of the date parameters selected. Now the data is such that i have a :

Transaction_Id

Customer_Tax_Number

Customer_Name

Customer_Retirement_Fund_Number

Retirement_Fund_Service_Number

Transsction_Date

 

The client wants to know how many transactions have come with Same Customer_Name and Different Tax_Number for a selected date range using filters on VA.

Since its a batch related rule I would have to run the duplicate logic on the data between the 2 selected dates.

My question is how can I execute a data query/proc sql or I am not sure what on the selection of 2 dates. I cannot find a mechanism where i can trigger this logic on selection of the 2 dates.

 

Hope someone can help me ot there.

P.S: i really do not want to use an alternate (excel macro) to do this. The business already uses excel extensively and the management wants them to get off it.

 

Thanks!

Samir

4 REPLIES 4
itchyeyeballs
Pyrite | Level 9

You might be able to do this using a calculated column that compares the transaction date to the two date parameters and produces a yes or no outcome which you could then filter on.

 

Theres a useful post here on how to use dates as parameters (its not out of the box functionality)

 

 

 

PeterWijers
Lapis Lazuli | Level 10

Hi Samir,

if you create a crostab with the customer name as first column and the tax nummer as second,

you use the count as report value.

if you ad a sliderbar to this report you can select a date range. Link the silderbar to the crostab.

as far as i can judge your problem, this should do the job.

I could show you a sample with other data how its done.

greetings

 

samstheway79
Fluorite | Level 6

Hi Peter

Apologies for the late response and Thank you for responding to my query. Well I think I did not explain the scenario properly so let me try again:

Consider a user interface with From Date and To Date and a Submit button. On the click of the button a query needs to run and populate a table. 

"select count(distinct name) , tax_number

from 

table1

group by tax_number

having count(distinct name)>1"

This is what I need to achieve using SAS VA. Is this possible?

 

Thanks!

Regards

Samir

PeterWijers
Lapis Lazuli | Level 10

Hi Samir.

You can create an agregated measure (maybe combined with a calculated item) as being the querry expression.   

The gouping will be done by the crosstable.  From date to date is the filtering.

 

So if you start cut down the querry into serveral parts of SAS VA functionality, it should work.

If you see possiblilies in this appreach, I gladly help you out.

Greetings

 

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!

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
  • 4 replies
  • 1293 views
  • 0 likes
  • 3 in conversation