Posted: Fri Mar 10, 2006 4:12 pm
For one week only, all is revealed!
A short text to describe your forum
http://dsxchange.com./
I was wondering - for the first part i can't use that in PX. But could you please dirve me using an example.ray.wurlod wrote:For small volume of data, a BASIC Transformer stage could serve here. Useto generate the quarter number (1, 2, 3 or 4). Then take the remainder after dividing the quarter number into the month number, added to the month number. Use the Mod() function to get the remainder after integer division.Code: Select all
Oconv(Iconv(TheDate, "D"), "DQ")
For larger volumes use a lookuptable in the Modify stage (function lookup_int16_from_string or lookup_string_from_int16 for example) to convert the month number to a quarter number. Then proceed as above in a Transformer stage. Or build the lookup as a delimited string "1,1,1,2,2,2,3,3,3,4,4,4" in a stage variable in a Transformer stage and use the Field() function to extract the appropriate quarter based on the month number then again proceed as above.