Alteryx Designer Desktop Discussions

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

How to select the column based on the value present in the column using dynamic select?

AYESHASIDIKHA
8 - Asteroid
Q1Q2Q3Q4Quarter
10324543Q4
20204511Q4

 

This is the input, I want to select the dynamic quarter based on the value present in the Quarter column' In this example I want only Q4 column as output as it is present in the Quarter column.

 

Thanks in Advance.

 

 

Ayesha

6 REPLIES 6
Hammad_Rashid
11 - Bolide

To select the dynamic quarter based on the value present in the "Quarter" column using the Dynamic Select tool in Alteryx, you can follow these steps:

  1. Input Data:

    • Start with an Input Data tool to bring in your dataset.
  2. Dynamic Select:

    • Connect the Input Data to a Dynamic Select tool.
    • In the Dynamic Select configuration, choose the "Field" dropdown and select "Quarter."
  3. Output Data:

    • Connect the Dynamic Select tool to an Output Data tool to write the selected columns to a new file or the same file.

In the Dynamic Select configuration, you can set up a condition based on the values present in the "Quarter" column. For your example, you want to select the columns where the value is "Q4." You can set up a condition like:

  • Condition: IF [Quarter] = 'Q4' THEN 'True' ELSE 'False' END

This condition will evaluate to "True" for rows where the value in the "Quarter" column is 'Q4', and these columns will be selected by the Dynamic Select tool.

 

Make sure to configure the Dynamic Select tool with the necessary settings, including specifying the conditions for column selection based on the values in the "Quarter" column. The output will then contain only the columns corresponding to the selected quarter.

binuacs
20 - Arcturus

@AYESHASIDIKHA @In the dynamic select tool write the below formula 

 

name=“Q”+toString(Ceil(DateTimeMonth(DateTimeToday())/3))

 

dkungu
8 - Asteroid

Not sure whether dynamic select tool can achieve the above. however find the workflow below that will give the same functionality. You can update column 'Quarter' to select different quarter.

m1.png

AYESHASIDIKHA
8 - Asteroid

This I have used, But in future years it will not work. If I run the workflow in Jan 2024 then If I am expecting Q4 results we will not get expected output if we use same formula

AndrewDMerrill
13 - Pulsar

Here you are! I believe this meets your requirements.

Screenshot.png

binuacs
20 - Arcturus

@AYESHASIDIKHA another option with the analytical app

image.png

Labels