Alteryx Weekly Challenge - 296

In preparation for my Alteryx Core Credential, I have completed a series of Alteryx weekly challenges. I figured the best way to test my knowledge is to create a beginner-friendly guide to completing Alteryx Weekly Challenge 296.

This challenge presents the data from the New York Times, a dataset of articles from January 1, 2020 to December 31, 2020 covering a range of topics.

There are three goals this challenge has you complete:

  1. Identify which day of the week has the highest number of sports articles published.
  2. Identify how many times the word "Football" is in the headline or keywords on the day of the week that has the highest number of sports articles published.
  3. Write a statement including this information in the format of: "The word football appears (y) times in sports articles published on (x)."

Question 1

Let's jump right in to solve the first goal. Below you can see the complete workflow for this question, followed by a breakdown:

First, after inputting the data, we must separate the sports and non-sports news articles. The Important field here is the "Section" column. While there is indeed a "Sports" News desk, other News Desks have no restrictions on also publishing sports articles.

To do this we will use a "Filter" tool, separating the two categories, leaving us with a remaining 569 records. Next, we are required to codify each publication for the day of which it was released.

As the date is retrieved from the data source with a string data type, we must first convert it to a date data type using "Select" tool.

To retrieve the publication day from the numeric date, we can use the "DateTime" tool, using a custom format "day" into a newly generated field, preserving the DateTime field.

Then, by using an "Filter" tool, we can seperate the publications released on a Monday leaving us with a remaining 132 rows. This is the final number required, and by using a "Summarise" tool, we can aggregate present the table in the required format as follows:


Question 2

The second goal requires that we identify the use of the word "football" in the headline or keywords columns. In this case, the question has asked that we also search for "Football" as well as "football", interchanging the capital "F". You can find the complete workflow below:

Steps 1-3 are the same as that which we laid out in answering question one. Carrying on from the same "DateTime" tool, we can use an additional "Filter" tool with the following code to extract the rows in which the word "football" is mentioned in the headline or keyword columns.

The default results for the "contains" function searches without case sensitivity, presenting us with 35 records after filtering. "Summarising" this data then leaves us with a concise table as follows, which allows us to answer the second question:

Question 3

Finally, to generate an adaptive field that answers the question in the following format:

"The word football appears (y) times in sports articles published on (x)."

We first have to convert the "count" field into a string type, rather than the numeric type that it has defaulted to, using the "Select" tool. This will allow us to generate an adaptive formula using the "Formula" tool with the following input:

"The word football appears " + [Count] + " times in sports articles published on " + [Day of the Week]

Resulting in the final table needed to answer question 3.

You can find a complete solution to this challenge here:

Author:
Morgan A Rennie
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab