BookmarkSubscribeRSS Feed
daniele_1306
Calcite | Level 5

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?

 

IMMAGINE_SAS_SUPPORT.png

2 REPLIES 2
daniele_1306
Calcite | Level 5

the columns not highlighted are my input data

ballardw
Super User

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.

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
  • 810 views
  • 0 likes
  • 2 in conversation