Skip to main content
Solved

How can i count how many TRUE and FALSE are there in each ROW ?

  • May 26, 2023
  • 3 replies
  • 21 views

vimva679
Supporter
Forum|alt.badge.img+9

Please appreciate if you could let me know in details

 

image

Best answer by ebygomm

If all the attributes with true and false values end in ZTF I would use a ListExpressionPopulator with a Source Attribute Expression of ZTF$ to get all the true false values in a list, followed by a ListHistogrammer which will then count the true false occurrences and return the results in a list

imageYou can then turn the list values into attributes

image

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2937 replies
  • May 26, 2023

One way to do this is to explode all attributes to features, merge and count the results.

  • AttributeExploder to create features from all attributes.
  • AttributeFilter to filter only features where value is true or false.
  • Aggregator to merge and count all features grouped by row id and attribute value.
  • FeatureMerger to merge the results back to the original values on row id.

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • Best Answer
  • May 26, 2023

If all the attributes with true and false values end in ZTF I would use a ListExpressionPopulator with a Source Attribute Expression of ZTF$ to get all the true false values in a list, followed by a ListHistogrammer which will then count the true false occurrences and return the results in a list

imageYou can then turn the list values into attributes

image


vimva679
Supporter
Forum|alt.badge.img+9
  • Author
  • Supporter
  • 96 replies
  • June 6, 2023

thank you all it works :)