Quantcast
Channel: Data Preparation & Blending discussions
Viewing all 4999 articles
Browse latest View live

Compare Values From Different Rows

$
0
0

I'm a new Alteryx user...trying to solve a problem:

 

Given the input data below, i need to output one row per User based on the following rules:

1. if Course Name = Cert Exam then 1 else 0
2. if Course Name = Sales Exam - New and Product Exam - New then 1 else 0

 

* Note for user4 below, they completed both the old and new exams, but only need to be counted once

Input:

 

User	Course Name
user1@myco.com	Sales Exam - New
user2@myco.com	Cert Exam - Old
user3@myco.com	Cert Exam - Old
user4@myco.com	Product Exam - New
user4@myco.com	Cert Exam - Old
user4@myco.com	Sales Exam - New
user5@myco.com	Product Exam - New
user6@myco.com	Cert Exam - Old
user7@myco.com	Product Exam - New
user7@myco.com	Sales Exam - New
user8@myco.com	Sales Exam - New
user9@myco.com	Sales Exam - New
user9@myco.com	Product Exam - New
user10@myco.com	Sales Exam - New
user10@myco.com	Product Exam - New
user11@myco.com	Sales Exam - New
user11@myco.com	Product Exam - New

 

Desired Output:

 

User	Cert
user1@myco.com	0
user2@myco.com	1
user3@myco.com	0
user4@myco.com	1
user5@myco.com	1
user6@myco.com	1
user7@myco.com	1
user8@myco.com	0
user9@myco.com	1
user10@myco.com	1
user11@myco.com	1

 

Any input to solve this is much appreciated!


Rounding down Date-Time to the quarter hour level

$
0
0

Hi,

 

I am looking to round my date time field down to the quarter hour (15 min level). An example of what I'm looking to achieve is below:

 

Current Date/Time
2015-03-06 18:18:16
2015-03-06 18:48:21
2015-03-06 19:03:22
2015-03-06 19:18:10
2015-03-06 21:33:13

would translate to...

 

QH Date/Time

2015-03-06 18:15:00
2015-03-06 18:45:00
2015-03-06 19:00:00
2015-03-06 19:15:00
2015-03-06 21:30:00

 

Does anyone have an easy fix for this? I was thinking of parsing the minute field out, and building a formula to determine the QH minute field each instance would be categorized under, and then concatenating the data together again. But I am guessing there is an easier way to handle this.

 

Thanks!

Carmin

Batch Macro to do mapping

$
0
0

Hi,

 

I am new to the macro world and designing a macro to help on a mapping action.

I have 2 tables,

Table A:

1.PNG

Table B:

2.PNG

And I have to look up the table A segment in table B to create something like below table and stack up for all segments.

3.PNG

 

But i come across the error

5.PNG

 

I understand this action may not actually need a macro to complete but I want to understand more on the sequence of batch macro's excution and how to deal with an error.

Thanks so much.

RegEx: Unspecified error at character 0

$
0
0

I have been working with RegEx tool for a long time now but it's the first time Alteryx complains about my expression:

 

((?<=<text>\s)[0-9\.]{3,5}|(?<=<text>\/0_0.|<text>\/_|<text>\/)[0-9\.]{3,7})

 

<text> is just a short string of letters only (but I had to remove it). I have a suspicion that the engine is complaining about ?<= but don't know why since the lookahead/behind are supported as far as I read here https://community.alteryx.com/t5/Alteryx-Knowledge-Base/RegEx-Perl-Syntax-Guide/ta-p/1288

 

I've been using this regex on https://regex101.com/ without any problems. There is one capture group (the outer parenthesis) and two options with different positive lookbehinds.. anybody can spot something I can't?

Advance all dates by a week

$
0
0

Is there a function or tool in alteryx to advance all the dates by a week?

 

Most of the dates in the file are the same but there are a few that are not. 

 

Something like a Find and Replace like in Excel

 

The file I am using is an excel file. 

Directory and Dynamic Input tool and text in specific cell

$
0
0

Hi, I'm using the Directory and Dynamic Input tools to import .xlsx files from a Sharepoint directory and am having seveal issues come up.  

 

First, I keep getting a "schemas don't match" error and am narrowing it down to the fact that there are merged cells in the files. They match between files but still getting the error. Is there a workaround for this? 

 

Next, I need to pull the value from Column D (F4) Row 3 and create a new field with this value copied down to the end of the results set.  I have successfully done this using a Multi Row formula tool in a separate workflow then joining but am finding that it is appending the value from the first Excel file to ALL of the data and not changing as the file changes. I'm assuming I need to somehow incorporate this process in my first workflow. 

 

Attached is my workflow - as you can see I'm also creating a start row as the 4 headers I need are below some random text and the merged fields. I think this might be complicating my efforts to pull out that single value within those rows and create the new field.

 

Any thoughts/suggestions would be appreciated.

 

Thanks!

 

Toni

Fuzzy Matching For Healthcare Claims

$
0
0

We have a list of healthcare claims that have an ID on each claim. In addition, we have a second list of claims that has and ID but it can be slightly different (maybe a digit off at the end, maybe a 4 was added or a 3, etc.). I have been able to transform the data into a single list with a source column holding the list the claim is from: list 1 or list 2 and a claim column holding the  claimID.  I would like to utilize the fuzzy matching tool to flag those claims that are in both list 1 and list 2 with the fuzzy matching tool but I am having some trouble, has anyone used the tool this way? It is more of fuzzy joining than matching. 

Last instance of a character

$
0
0

How do I identify the location of the LAST instance of particular character (base zero)?

 

C:\\Location\Folder\Folder\Files.xlsx|Sheet1  has its last "\" at character 26

C:\\Location\File.txt   has its last "o" at character 10

C:\\Location\Folder\Folder\Folder\Folder\FileswithSheets.xlsx|Sheet1  has its last "|" at character 61

 

I assume I need some regex, but I'm not very confident using regex yet.


Too many fields in record#1

$
0
0

Hi,

 

I have the attached csv file and want to prepare the data. I have also attached the required output file.

 

Appreciate your help.

 

Thanks

 

Jag

Join is reeeeally slow

$
0
0

Hello all,

 

I'm new here, but I've tried searching for an answer to this already. I'm relatively proficient with Alteryx (well, not bad for four months of training!). My issue is that I'm joining two files - and it's taking waaaaay too long. If I filter the data to minimise the amount joining, the module finishes pretty quick, but I've left the full module running for about 19 hours now and it's sticking at around the 92% mark. The input files are 158MB and 255MB, but this join is going up past 2.1TB! Is there anything I can do to speed this up/allow it to finish? What am I missing? One file is the sales data by customer, and the other is the customers data to allow me to append the account information onto their sales data.

 

Thank you!!

Identifying duplicate record id's to override a timestamp

$
0
0

I'm trying to identify duplicate values in my dataset in order to pull out the most recent date in a separate field. My goal is to keep the entry with the earliest date stamp so that I have a final file of unique records.

 

In excel I would typically conditionally format the column for duplicates and then compare the two date fields. I'm struggling to come up with a solution to achieve this with Alteryx.

 

Any ideas are greatly appreciated!

Formula to assign dates?

$
0
0

I wanted to know if there is a certain type of formula that can autofill dates to remove manual manipulation each time I run a workflow. Currently for each new report I run there is a date range that I am manually adjusting in bold

 

IF [DAY]="Monday" THEN "07/11/2016" ELSEIF
[DAY]="Tuesday" THEN "07/12/2016" ELSEIF
[DAY]="Wednesday" THEN "07/13/2016" ELSEIF
[DAY]="Thursday" THEN "07/14/2016" ELSEIF
[DAY]="Friday" THEN "07/15/2016" ELSEIF
[DAY]="Saturday" THEN "07/16/2016" ELSEIF
[DAY]="Sunday" THEN "07/10/2016"
ELSE "" ENDIF

 

If I enter one date for my event start date of 07/12/2016 is there a way to make Alteryx know to change monday to 7/11 and so on? Another caveat to this reports is the dates are always at a future point in time so it's not the current date, I am always going to be about a month ahead of when I work on it..if that makes sense.

 

Thanks in advance for the help!

 

 

Replacing particular occurrence of a character

$
0
0

I want to identify and replace the third occurrence of the "T" character in each data row

 

AGCTTAGGCGAGTGCGAGTGCGATA

AGCTAGGCCGTAAAGCGAGGAGCCC

CTAGCATGCATGGGACCTAGGACCA

TAGAGATCGACGATTTACGAGGTTC

 

to

 

AGCTTAGGCGAGUGCGAGTGCGATA    replaces it at character 12 (base 0)

AGCTAGGCCGTAAAGCGAGGAGCCC    only 2 occurrences, replaces nothing

CTAGCATGCAUGGGACCTAGGACCA    replaces it at character 10

TAGAGATCGACGAUTTACGAGGTTC    replaces it at character 13

 

This is a simple case.  I'm looking for something like this that will work for any occurrence and any character or string more generally.  I expect it will require REGEX, but I'm not yet proficient with it.

Block Until Done - is this a correct or possible use of Block Until Done?

$
0
0

I open a file - mess with it then out put it.

I put a Block Until Done just before the Output Data.

 

Next I open the file I just output and mess with it.

 

This seems to be working... but I fear it may only beworking because my data size (rows = 25) is so small.

 

Can someone tell me if this is a possible way to use the Block Until Done tool?

 

blockuntildone.png

Transpose every n Rows

$
0
0

Hello Friends,

 

I have a table as below. I need to transpose every 4 Columns into a table . Can you please help me to solve this probelm.

 

Query

NameHelen
AddressFirestone Avenue
CityCavespring
StateArkansas
NameCharles
AddressTurnbridge Drive
CityDallas
StateTexas

 

Required Result

NameAddressCityState
HelenFirestone AvenueCavespringArkansas
CharlesTurnbridge DriveDallasTexas

Writing Expressions Involving Time

$
0
0

I'm trying to write an expression using the time portion of a timestamp.  The format of the timestamp is yyyy-mm-dd hh:mm:ss.  I'm trying to write a formula to return 'True' if the time is after 6:00.   What is the best way to do this?  Do I need to trim the time portion out of the time stamp?  Thanks!

Auto Convert [Most] Any Date Macro

$
0
0

So I read and read and still couldn't find anything that would use most all of the supported date formats and auto detect which to use and then convert that to a date. I found one article that did it for 4 date formats, but I wanted it to be able to handle 50+... I think there were some python libraries that would do it, but I needed it to be native Alteryx. So... I took a stab at it. It might not be the most elegant, but the attached macro will automatically detect most any date format and convert it to a standard YYYY-MM-DD date. Now, of course, it has to choose dd vs mm first... so I defaulted to mm/dd/yyyy over dd/mm/yyyy as long as it was an eligible date (US preference). I guess that could have been a parameter into the macro. Feel free to improve and post back here!

Enjoy!

Justin

 

Examples:

 

Date conversion examples.png

Repeat Item labels in fields

$
0
0

Hi All,

 

I have data in below order

 

Cust1  USA

Cust2  India

Cust3  China

 

I want my data in this form

Cust1 USA

Cust1 India

Cust1 China

Cust 2 USA

Cust2 India

Cust2 China

....

Can someone please help me with this, Thanks alot

String Parsing

$
0
0

I am a little stuck with a string parsing workflow. I am trying to parse a string from right to left in groups of 10. The Regex tool seems to work fine but I can only get it to work when I parse from left to right. The strings are not all the same length and they may not be divisable by 10. 

 

 

Essentially if we were parsing the alphabet I would like the get:

 

ABCDEF

GHIJKLMNOP

QRSTUVWXYZ

 

Is there a way in Alteryx to easily accomplish this?

 

Read one record at a time in iterative loop

$
0
0

Hi Friends,

 

I have a requirement of reading one record at a time , build a Json file based on it, append to an URL and then called the Webservices to Download the records, I dont know how to read one record at a time and then do a iterative processing, Please help me.

 

 

Viewing all 4999 articles
Browse latest View live