I have an excel file that shows me categories names, sales, datetimes and subcategory names in the format below, I'm trying to figure out how I can use Alteryx to re format this into 4 columns, one called "category" , one called subcategory, one called sales and one called datetime.

The number preceding the name value matches the category so 0 is linked to the food category and 1 is linked to the tools category. my ideal output would look like this with my four columns, another column is created for my subcategories, and I can use my category name column to group things together, and if the row is a category, then the category name is listed in the subcategory column instead of subcategory.

Does that make sense and is that possible? and if so, how would I accomplish that?
I've attached a sample excel file.