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

Filter Using String Data

achadaga
6 - Meteoroid

Hi all,

        I am trying to filter json data containing more than one fields. How should i go about it. Basic filter allows me to use one variable. And I am not parse error while using custom filter. 

Below is the example of the problem i am facing.

My json file contains both address and date along with many other columns. How do i put both the strings in the same filter tab instead of using many.

 

Contains([JSON_Name],"address")
Contains([JSON_Name],"date")

5 REPLIES 5
NeilR
Alteryx Alumni (Retired)

try OR, as in...
Contains([JSON_Name],"address") OR Contains([JSON_Name],"date")
here is the relevant help page:

Capture.PNG

[sorry, this site wasn't letting me insert the link above, you'll have to type it out]

MarqueeCrew
20 - Arcturus
20 - Arcturus

If Neil's answer wasn't sufficient to close, could you please include a JSON response and what you'd like to filter in business terms?

 

Thanks,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
achadaga
6 - Meteoroid

Thank you for the response Neil & Marquee . I have attached a snapshot for reference. In the json file that i have, JSON_Name contains column name for all the records and JSON_Valuestring and JSON_ValueFloat contains the rows that I need to extract. I can use the text to columns tool but before that I have to extract these columns and transpose them.

 

 

DylanB
Alteryx Alumni (Retired)

It looks like these are your general steps:

  • Use text-to-columns tool to separate the record ID. This seems to be the part up to the first period, so your delimiter will be a period (".").
  • Re-name and re-type the fields we just made
  • Since each row only has one value between 'ValueString', 'ValueInt', and 'ValueFloat', we can concatenate these together. This is going to require turning numerical values into strings since there's no way to add a string (even if it's empty) to a number.
  • Use the cross-tab tool to turn 'JSON_Name' categories into our columns.
  • Now, fields can be re-named and re-typed

I'm attaching a workflow that takes a little bit of your data (including the lat/long coordinates) and follows this process (with comments). Let me know if you have trouble with the other JSON_Name values. The most important part will be that you rename and retype your fields (particularly the date field) in the last step. 

 

In general, it is easier to get help on your problems if you send some data instead of a screen shot of it, since it's easier for someone to use a "Input Data" tool than to type a copy of your data in.

achadaga
6 - Meteoroid

Hi Dylan,

              Thank you so much for the detailed instructions. That was really helpful. In future will attach a file so that it is easier to interpret and design.

Labels