BookmarkSubscribeRSS Feed
Ross12345
Calcite | Level 5

Hi,

 

Consider a retail stores credit card fee structure:
Account type = A{1,...,a}   - character
Product type = B{1,..., b}  - character 
Sub product type = C{1,..,c}   - character
Cost = D{1,...,d}    - finite number of numeric costs

 

Note that the length of B varies on the depending on the a_i in question and the length of C depends on the b_i (product type) in question.
There is a specific cost associated with a given transaction on a given account type, product type and sub product type - that varies with transaction sizes. There are bands to this pricing and my objective is to highlight anomalies in this relationship.

Bands example:
1) Transactions from $0 to $1000, we expect a fee of $10. 
2) Transactions $1001 to $2000, we expect a fee of $15. 
Anomaly in 2) could be a transaction of $900 or $2100 with a fee of $15. These anomalies could be identified through building the aforementioned loop and highlighting the top and bottom 1% of transaction sizes for the given fee amount.

 

I have struggled with building this in SAS. I have explored and tried tweaking numerous sets of code available on these forums without any luck.


Please assist / advise - or is there any easier way to approach this problem in SAS?

 

 






 

 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Please provide a small (but representative) example data set following these instructions, and also please provide the desired output from this small example data set.

--
Paige Miller
ballardw
Super User

Example of what actual data looks like, as in a few rows of values similar to what you would expect to see in the process. The values need not be actual, just show the behavior. And then describe using that example how to do the actual comparison that you need.

Your descriptions don't really provide much to work with.

 

I am going to guess from the indirect description that a main challenge might be in getting a usable format.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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