I have a set of data that lists all of the dividend transactions for hundreds of different stocks (each with a corresponding unique CUSIP#), but many of these stocks pay multiple dividends throughout the year, so this data has anywhere from 10 to 2000 entries per stock. If I build a formula and append a "# to Sample" field to that data set, is there anyway I can sample "X" number of dividend records for a given stock based on that value in the "# to Sample" field? Within the standard sample tool, I don't see a sample based on formula. If it let me put N equal to a variable or field (i.e. "# to Sample") then it would be problem solved I guess.
Any thoughts?
That # to Sample would be calculated using a summarize function and then a formula to calculate how many per CUSIP, and then I guess I would run the sample off of the raw data.
Hopefully this makes sense. TIA for your help
Solved! Go to Solution.
When it says the macro has an error in tool #2, you have to look inside the macro and find tool #2, which is the filter tool. The filter tool is looking at LocationLang field, so probably has to do with that. Or, it has to do with the action tool not needing the quotes in the "replace" selection.
Glad you like the macro! If you wouldn't mind, it'd be great if you marked my response as a solution, if you believe it was a suitable solution.
Thanks!
How does one mark a post as an answer? Would "STAR"'ing it would be enough?
To mark accepted, just click on the three ellipses (three dots) to the upper right of the post. There you'll see an option "accept as solution".
Thanks!
@mbarone
It seems that as I'm not the creator of the post I do not have that option available.
Oh, didn't realize! No problem, just glad I was able to help!
User | Count |
---|---|
56 | |
27 | |
25 | |
23 | |
21 |