Skip to main content
Question

aggregate values in key-value pairs and write matrix


vki
Contributor
Forum|alt.badge.img+7
  • Contributor

This is my initial data:

Name,Value

 

sza034,ber_afu

 

sza033,ber_awn

 

sza034,ber_afl

 

sza033,ber_afu

 

sza034,ber_afu

 

sza032,ber_awn

 

sza034,ber_afl

 

sza033,ber_fff

 

sza033,ber_bgt

 

sza033,ber_afu

 

sza033,ber_jij

The result has to be a matrix, with a row for each unique name and a column for each unique value.

the fields in the matrix have to be filled with "yes" or "no":

Name,gschber_afl,gschber_afu,gschber_awn,gschber_fff,gschber_bgt,gschber_jij

 

sza034,yes,yes,no,no,no,no

 

sza033,no,yes,yes,yes,yes,yes

 

sza032,no,no,yes,no,no,no

By using the Aggregator, AttributeSplitter, ListDuplicateRemover and ListSorter, I managed to get for each name a list with its unique values. But how can I write this matrix now?

Thanks in advance.

Vera

5 replies

takashi
Influencer
  • May 22, 2018

Hi @vki, this workflow might help you.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • May 22, 2018

If your potential values are static (don't change) then use takashi's workflow. If they are dynamic, or there are too many to manually expose, here's an alternative.

 

keyvalueyesno.fmwt

vki
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • May 23, 2018

Thanks for your answers. takashi's one was perfect for me.


vki
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 29, 2021
jdh wrote:

If your potential values are static (don't change) then use takashi's workflow. If they are dynamic, or there are too many to manually expose, here's an alternative.

 

keyvalueyesno.fmwt

@jdh​ 

I have to come back to this post, for now I need a solution for dynamic values...

Unfortunately, I can't download keyvalueyesno.fmwt anymore.

Could you explain me, how you managed to create a dynamic matrix?

Thanks, Vera


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • January 29, 2021
vki wrote:

@jdh​ 

I have to come back to this post, for now I need a solution for dynamic values...

Unfortunately, I can't download keyvalueyesno.fmwt anymore.

Could you explain me, how you managed to create a dynamic matrix?

Thanks, Vera

It turns out I still had the workspace. The MergedSchemaSetter has since been replaced with the SchemaSetter on the hub.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings