so this might be very easy but somehow i dont find a working solution. My problem is as follows:
- in a tabular model in ssas i want to create a calculated column
- every row of another column should be checked if a certain condition is met and depending on which condition is met, a value should be returned into the calculated column
example:
i have a text column A which contains the following strings (each in a different row):
"DtD 24"; "SGK 12"; "STD 99" etc.
now what i want to do, is write a formula which checks the above mentioned column row-by-row, and
- when it finds "12" somewhere in the string then it should return "12" as value for that row
- when it finds "24" somewhere in the string then it should return "24" as value for that row
... and so on for like 4 different cases.
I tried to find a solution with switch(), with if(), with find() but none seem to work. has anybody some tips for me what would be a smart way to solve this problem?
thank you very much in advance!