count function for nominal values

User: "lghansse"
New Altair Community Member
Updated by Jocelyn

Hi, 

 

I have a list of 25 nominal attributes, which I would like to aggregate to 1 attribute that counts the 25 said attributes if they have a valid value (being: not missing), but I'm at loss at how to do it in an easy way. I've looked at the aggregate, generate aggregate and generate attributes functions, the aggregate-functions seem only useful for integers and the generate attributes does not have a count-function (at least, not that I've found). I've included an example below for clarity. 

 

att1         att2         att3           att4        att5   

valuex    valuey     missing     valuez    missing

missing  valuex     missing     valuey    missing

 

-> So the new attribute should have value 3 for example 1, and 2 for example 2. 

 

Anyone has experience with this? 

 

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Edin_Klapic"
    New Altair Community Member
    Accepted Answer

    Hi @lghansse,

     

    The Operator Generate Aggregation has a aggregation function count.

    It works as expected - I get the value 3 for example 1, and 2 for example 2. 

    See screenshot below for details.

     

    Best regards,

    Edin

    image.png