Alteryx Designer Desktop Discussions

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

Transpose ? - Create Filter

JDong
8 - Asteroid

Hi,

 

I have 20 columns in my dataset and of this format

 

SchoolAddressYearMathsSciencePhysicsBiologyChemistryGeology
1Address 12001 11   
2Address 22002  1   
3Address 3200311    
4Address 420041   1 
5Address 52005    1 
6Address 62006  1   
7Address 72007  1   
8Address 82008  1   
9Address 92009  1   
10Address 102010   1  
11Address 112011    1 
12Address 1220121     
13Address 132013      
14Address 142014      
15Address 1520151  1  
16Address 162016    1 
17Address 172017    1 
18Address 182018     1

 

I want to now combine the columns 

 

MathsSciencePhysicsBiologyChemistryGeology

 

To a single column so the data can be filtered on multi select. Can we create a subject filter and then select specific values (multiple values) to filter the data.

 

Subject
Maths
Science
Physics
Biology
Chemistry
Geology

 

Would this be right wa to filter the datasets ? Please advise how this design can be achieved.

 

Thanks

6 REPLIES 6
AngelosPachis
16 - Nebula

Hey @JDong ,

 

To bring all subjects in a single column you should use a transpose tool, where you have to select the "Key columns" as those that you don't want to pivot onto a vertical axis.

 

Then you can use a filter tool with multiple OR statements (i.e. [Subject]="Maths" OR [Subject]="Science" OR ..... )

 

or an In statement (i.e. [Subject] IN "Maths","Science","Physics")

 

AngelosPachis_0-1620247169370.png

 

Whatever falls out of the T output anchor are records that belong to the subjects you specified in the filter tool.

 

Hope that helps,

 

Angelos

JDong
8 - Asteroid

@AngelosPachis 

 

Thanks !

 

For some reason my Value column output shows lot of Null values and some of the '1' value is not showing up. Any idea if this is because of the excel dataset ? How can I get this working perfectly...

 

DigitMac_0-1620248130116.png

 

Ideally I should see 1 for 2 rows here

AngelosPachis
16 - Nebula

Hi @JDong 

 

Nulls are to be expected because there are no values populating those cells.

 

Now to help you with the second query, I will need something more representative of your dataset, as it's hard to troubleshoot it by speculating what the issue might be; maybe you can attach a more representative sample of the data ?

 

Cheers,

 

Angelos

JDong
8 - Asteroid

Hi @AngelosPachis 

 

SchoolAddressYearMathsSciencePhysicsBiologyChemistry
1Address 12001 11  
2Address 22002  1  
3Address 3200311   
4Address 420041   1
5Address 52005    1
6Address 62006  1  
7Address 72007  1  
8Address 82008  1  
9Address 92009  1  

 

This is exactly the data I have , but as marked the Address 1 (both the 1 values are not transposing and shows 0)

 

The field datatype I have changed to int16 from string but still same result. The data is in excel and as attached from original.

 

Thanks

 

AngelosPachis
16 - Nebula

@JDong it appears to be working when I try it

 

Screenshot 2021-05-06 092619.jpg

 

So for address 1, I can still see 1 for Science and Physics. Can you double-check that you have configured the tool in the right way?

 

 

JDong
8 - Asteroid

Yes..sorry overlooked...values were getting filtered in an earlier step

 

Labels