Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a table like below:
I want to change the filed of Agent in a condition that as long as Customer Name contains key word A or key word B,
the field of Agent 's value changes into Agent Manager from Agent D/E.
I guess this involves a if function with wild card like * key word, or something like that.
how do I make the expression at agent field?
something like this ? "if customer name ={* key word), Agent X, Agent "
ID | User Name | Customer Name | Agent | Measurement A | Measurement B |
Customer Name A | Agent A | ||||
Customer Name B | Agent B | ||||
Customer Name C | Agent C | ||||
Customers with key word A | Agent D | ||||
Customers with key word B | Agent E |
@coloful_architect Please see the below code that I have used. I have also attached the output.
NoConcatenate
Temp:
Load * Inline [
Customer Name, Agent
Customer Name A, Agent A
Customer Name B, Agent B
Customer Name C, Agent C
Customers with key word A, Agent D
Customers with key word B, Agent E
];
NoConcatenate
Temp1:
Load [Customer Name],
if( WildMatch([Customer Name],'*key word A*','*key word B*'),'Agent Manager',[Agent])
as [Agent]
Resident Temp;
Drop table Temp;
Exit Script;
If this resolves your issue, please like and accept it as a solution.
my bad. I should be more specific. I only want to have this expression to reflect at a table for that field "agent" instead of at loading script.
I changed your loading script code a bit to adapt into chart expression for agent filed. it says error in expression. not sure what I missed.
may I ask what the chart expression should look like?