Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I've been struggling to find answer here that I can apply to my own scenario. I'm very new but I'll do my best to explain clearly:
My table contains bank transactions:
LOAD
"Date",
"Name / Description",
Account,
Counterparty,
Code,
"Debit/credit",
"Amount (EUR)",
"Transaction type",
Notifications
I've been trying to create an additional 'Category' field in which I want to categorize the transactions based on the values "Name / Description" field. For example, if the string from "Name / Description" matches a shop name from the variable vCatGroceries then the value in the newly created 'Type' field value for this record would be 'Groceries', or if it instead matches a string from the variable vIndividuals then it would be classified as 'Transfer' and so on.
The goal is that I would like to set up a variable for each category where I could add more conditions later on without having to modify anything else in the script.
SET vCatGrocecies='*shop1*','*shop2*','*shop3*','*shop4*';
SET vCatIndividuals='*person1*','*person2*','*person3*','*person4*';
I tried the below so far, but could only get it to work without using the variables themselves and only with 1 category as I wasn't sure how to make this work with an OR statement for the additional categories.
IF(WILDMATCH([Name / Description],'*shop1*','*shop2*','*shop3*','*shop4*')>0,'Groceries') as Type,
Thanks in advance!
@RedKetchup69 Could you please provide some sample data for me to work on it? Thanks.
I wouldn't try to categorize such data with variable-lists and wildmatch-approaches else loading these data within tables which are then associated to your facts and/or using a Mapping ‒ approach for it.
- Marcus