Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have expression as below.
when I am using this it is showing error as Error in expression:If takes 2-3 parameters
If(MixMatch(Zinc,'Present',
IF (MixMatch( Coal,'Marbel Transfer'),'Ready',
If(MixMatch(Zinc,'XX','YY','CC','SS','VV'),'Ready',
If(MixMatch(Coal,'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ',
If (Not Match(Coal,'Marbel Transfer'),'Ready')))))))) as [Ready],
Please can anyone suggest me how to set this?
Thanks.
One issue I see in the qvw you have attached is that the Coal column is almost empty
Is the goal is to fill NotReady everywhere we don't have Ready in column Ready? If that is the goal you can probably use this:
If((Zinc = 'Present' and Coal = 'Marbel Transfer') or (MixMatch(Zinc, 'XX', 'YY', 'CC', 'SS', 'VV')), 'Ready', 'NotReady')) as Ready
Your if statement doesn't make sense. If Coal matchs 'Marbe Transfer' [Ready] should have value 'Ready' and if it doesn't match 'Marbe Transfer' again it is called 'Ready'??
If(MixMatch(Zinc,'Present',
IF (MixMatch( Coal,'Marbel Transfer'),'Ready',
If(MixMatch(Zinc,'XX','YY','CC','SS','VV'),'Ready',
If(MixMatch(Coal,'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ',
If (Not Match(Coal,'Marbel Transfer'),'Ready')))))))) as [Ready],
If your provide the logic, we might be able to provide you with a better if statement.
With regards to the error:
You are missing ,'Ready' for your first If statement
=If(MixMatch(Zinc,'Present'), 'Ready',
IF(MixMatch(Coal,'Marbel Transfer'),'Ready',
If(MixMatch(Zinc,'XX','YY','CC','SS','VV'),'Ready',
If(MixMatch(Coal,'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ',
If(Not Match(Coal,'Marbel Transfer'),'Ready')))))) as [Ready]
I hope this helps.
Best,
Sunny
sorry I should have use NotReady in above line where there is Not match.
Please see below this is my requirement:
my excel sheet have below columns
ExcelA:
Date Id Name Zinc Coal Spent
I have to insert one column 'Ready' in between 'Zinc' and 'Coal' in ExcelA sheet
for that I have to use condition as below
when Zinc = 'Present' and Coal = 'Marbel Transfer' then [Ready] = Ready
when Zinc = 'XX','YY','CC','SS','VV' then [Ready] = Ready
When Zinc = 'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ' and Coal not equal to 'Marbel Transfer' then [Ready] = NotReady
how can I write script by using above conditions. Please help.
Still not sure about this:
When Coal = 'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ' and Coal not equal to 'Marbel Transfer'
Because if Coal is NOTXX, then it def. won't be Marbel Transfer (so there is no point checking for Coal not equal to 'Marbel Transfer' here. Try the below if the conditions you have given me is what you are looking for:
If((Zinc = 'Present' and Coal = 'Marbel Transfer') or (MixMatch(Zinc, 'XX', 'YY', 'CC', 'SS', 'VV')), 'Ready',
If(MixMatch(Coal, 'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ'), 'NotReady')) as Ready
I hope this will help.
Best,
Sunny
sorry there is typo mistake. I edited it. Please see below
when Zinc = 'Present' and Coal = 'Marbel Transfer' then [Ready] = Ready
when Zinc = 'XX','YY','CC','SS','VV' then [Ready] = Ready
When Zinc = 'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ' and Coal not equal to 'Marbel Transfer' then [Ready] = NotReady
Hi,
use if with wildmatch()
try like
if(WildMatch(Zinc,'Present') and wildmatch(Coal,'Marbel Transfer'),'Ready',
if(wildmatch(Zinc,'XX','YY','CC','SS','VV'),'Ready',
if(wildmatch(Coal,'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ','Marbel Transfer'),'Not Ready')
)
) as Ready_NotReady_Flag
Regards
Hi,
use if with wildmatch()
try like
if(WildMatch(Zinc,'Present') and wildmatch(Coal,'Marbel Transfer'),'Ready',
if(wildmatch(Zinc,'XX','YY','CC','SS','VV'),'Ready',
if(wildmatch(Zinc,'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ') and wildmatch(Coal,'Marbel Transfer'),'Not Ready')
)
) as Ready_NotReady_Flag
Regards
Try this:
If((Zinc = 'Present' and Coal = 'Marbel Transfer') or (MixMatch(Zinc, 'XX', 'YY', 'CC', 'SS', 'VV')), 'Ready',
If(MixMatch(Zinc, 'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ'), 'NotReady')) as Ready
if(
(Zinc='Present' and Coal='Marbel Transfer')
or (match(Zinc, 'XX','YY','CC','SS','VV'))
or (match(Zinc, 'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ') and Coal<>'Marbel Transfer'),
'Ready',
'Not ready'
) as Ready
Forgot to update the last formula (Use this one and disregard the last one)
If((Zinc = 'Present' and Coal = 'Marbel Transfer') or (MixMatch(Zinc, 'XX', 'YY', 'CC', 'SS', 'VV')), 'Ready',
If(MixMatch(Zinc, 'NOTXX','NOTYY','NOTSS','NOTCC','NOTZZ') and Coal <> 'Marbel Transfer', 'NotReady')) as Ready