I would like to create an ordered list with counters for three attributes.
I would like to insert the meters highlighted in red in my table.
could anyone help me?
the columns not highlighted are my input data
Please state the rules involved.
I would guess that you are incrementing cliente_group_cliente when the "id conto" value changes. Guess, because you only show one value for "id conto".
I would also guess that counter_in_group_attivita increases when "Tipo attivita" changes.
Those two I can do.
I might guess that the counter_att_flag is set to 1 when flag_attivita is one then increased until the the next 1 is encountered. But it is not clear whether that count would reset when TIPO Attivita changes or not. And what if the first value of Flag_attivita is not 1 for the first value of Tipo Attivita?
Please state the rules.
Show examples with at least two values of ID Conto.
I cannot write code against a picture.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.
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!
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.
Ready to level-up your skills? Choose your own adventure.