Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Exclude fields from dynamic deselect

Mikis
8 - Asteroid

Hello everyone,

 

I have a table with key fields and values. The values are only filled in if they're relevant.

In attachment I made an example, the data looks somewhat like this:

 

fieldAfieldBfieldCfieldDvalue1value2value3value4value5value6
1ax 0,15 0,53 0,09 
1ay 0,25 0,78 0,11 
1bx 0,17 0,66 0,49 
1by 0,63 0,31 0,36 
2ax  0,15 0,34 0,89
2ay  0,65 0,81 0,29
2bx  0,45 0,92 0,19
2by  0,25 0,79 0,28

 

The flow that I've built filters on fieldA = 1 and deletes the null fields, then filters fieldA = 2 and deletes the null fields.

Both flows are then rejoined ignoring fieldA.

So this should be the result:

 

fieldBfieldCfieldDvalue1value2value3value4value5value6
ax 0,150,150,530,340,090,89
ay 0,250,650,780,810,110,29
bx 0,170,450,660,920,490,19
by 0,630,250,310,790,360,28

 

The problem is that fieldD is also blank, so it gets removed and the macro that I've built tries to join on fieldD.

Basically I want to add a statement in my "remove null fields" that it should not get removed

don't remove.PNG

 

Does anyone know how to set this up?

 

Thanks in advance,

Mikis

5 REPLIES 5
LordNeilLord
15 - Aurora

Hey @Mikis

 

I think there might be an easier way to achieve the output you are looking for.....If you make use of the summarize tool you can use the MAX, min or concat function to combine all of the records together....

 

Max.PNG

Mikis
8 - Asteroid

Hello @LordNeilLord

You're right, but I'm afraid I haven't properly explained my usecase :)

 

The data that I have is actually a number of respondents (people) that give scores on companies, brands and the combination of company/brands

Sadly, those 3 types of scores (brand, company & the combination of both) are on individual rows and I want to merge them.

In reality I filter on company & brand is not null, and then I use a join to add the brand & company score.

In the below example, 'age' is not filled in, but I do want to join on age IF it would be filled in. So basically it should not be removed.

 

respondentagegendercompanybrandbrand_scorecompany_scorecompany_brand_score
1 maleA  5 
1 male x3  
1 maleAx  2
2 femaleA 6  
2 female x 8 
2 femaleAx  9

 

And this table should become

 

respondentagegendercompanybrandbrand_scorecompany_scorecompany_brand_score
1 maleAx352
2 femaleAx689

 

Does this make more sense?

LordNeilLord
15 - Aurora

Would this not work for you?

 

group2.PNG

Mikis
8 - Asteroid

Hello @LordNeilLord

Apologies for not giving the full problem from start

That wouldn't work, because one respondent can give answers for more than one company and/or brand

in the below example, if we filter company & brand is not null, then we get 3 combinations: A/x, A/y and B/y

That means that we need to duplicate the score that respondent 1 gave on company A for brand x and y.

input:

Capture.PNG

Output with your flow (so A/x is gone):

Capture.PNG

 

 

danrh
13 - Pulsar

I have a suspicion that @LordNeilLord is on to something, but if it can't be done that way then an easy option might be to just add back the fields you need.  Since they're null anyway, you don't need the data and could just add the columns after your Dynamic Select.  Something like this would do the trick:

image.png

Labels