Alteryx Designer Desktop Discussions

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

Reverting values to its original on specified date. using SQL in alteryx.

Pickaxe
7 - Meteor

Hi Everyone,

 

This is my first post on this community.I have recently started Alteryx Automation and Im loving it so far.

 

I connect to a aSQL server using alteryx to get data from the server to change values of specific column that have been populated for some given condition.

I will change these values manually and re-run it the next day and so on.

 

I would have to revert back the change after the date that has been specified in the data.

 

for better understanding Ill share an example

lets take today as (11/11/2021)

  • data fromSQL server - change value from 23 to 25
column Avaluedate to be reverted 
12352312/11/2021
12322312/11/2021
12222511/11/2021
12352313/11/2021

 

change the value from 23 to 25 , and back to 23 on the date specified on column C

 

****IMPORTANT**** If there are 25 on the value column ( B ) - check for when to revert ( date column ) and revert it back respectively .

 

Now can anyone assist me on automating the process of reverting the data from 25 to 23 on the date specified. I am stuck in this for weeks and cannot move forward.

 

pitch in any solution that is relevent that might help.

Thanks in advance.

6 REPLIES 6
mceleavey
17 - Castor
17 - Castor

Hi @Pickaxe ,

 

I'm not sure I understand.

Revert it back from what? To what?

 

M.



Bulien

Pickaxe
7 - Meteor

My bad , revert the values in column B . i.e from 25 to 23 on the date specified in column C.

 

I need assistance in automating that. Any suggestions ?

mceleavey
17 - Castor
17 - Castor

Hi @Pickaxe ,

 

no problem, just convert your date field to a date format using the DateTime tool (or formula if you prefer), then build a formula as follows:

 

if datetimetoday()>=[Date to be Reverted] then 25 else [value] endif

 

mceleavey_0-1634064030881.png

 

This will update the value when the revert date is today or in the past.

 

I've attached the example.

 

I hope this helps,

 

M.



Bulien

drew9
9 - Comet

Hi @Pickaxe , can you please give a better example of what exactly you need the data to do? I'm not understanding the first table you provided. What is the logic that needs to be automated? Where do the values 23 and 25 come from? How is the date chosen and what determines what it changes to?

Pickaxe
7 - Meteor

Thanks a lot.

 

Will try it out😊

 

 

Pickaxe
7 - Meteor

The data is populated from a SQL server. Based on the pre defined conditions.

 

The logic to automate - whenever the date column is today's date and if we have any 25's in column B we have to change it back to 23 in sql server's table

 

FYI  we would have changed it to 23 in the first place . The date determines the change.

Labels