Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all ![]()
I have this expression which i can't get to work properly,
Sum({<FrontLossFlag ={'*'} - {'1'}, DataSource = {'*'} - {'DPW' , 'DEX (DPW)' }>} Real)
If I remove either 'DPW' or 'DEX (DPW)', then it works. But not if both a left inside the expressions, then it return the value of zero, which isn't correct.
I can't seem to figure what I'm doing wrong? I've also tried inserting '[ DEX (DPW) ] ', however this doesn't return the correct value either.
I hope someone can help ![]()
Regards
Stefan
Have you tried using Aggr() ?
Why not
DataSource -= {'DPW' , 'DEX (DPW)' }
What if you are trying something like below
Sum({<FrontLossFlag -= {'1'}, DataSource -= {'DPW' , 'DEX (DPW)' }>} Real)
Note - I assume DEX (DPW) is not valid name. Will you check same
you can replace the key word in script like below and then use it in set analysis
LOAD *,
if(DataSource ='DEX (DPW)','DEX_DPW',DataSource ) as DataSourceNew
Sum({<FrontLossFlag ={'*'} - {'1'}, DataSourceNew= {'*'} - {'DPW' , 'DEX_DPW' }>} Real)
Hi Antonio
I've tried that also, and it doesn't work. ![]()
Hi Anil
I've tried above alsp and it doesn't work.
If I make the expressions as none set analysis then it work.
Sum(if(FrontLossFlag <> '1' AND DataSource <> 'DPW' AND DataSource <> 'DEX (DPW)' , Real))
So DEX (DPW) is a valid name. ![]()
It's pretty difficult to solve these problems without more information and some sample data.
You need to isolate the issue. Can you first confirm that this works in isolation and filters just for the values you want to exclude:
Sum({<DataSource ={'DPW' , 'DEX (DPW)' }>} Real)
Sum({<FrontLossFlag ={'1'}>} Real)
If so, then perhaps you could try something like this:
Sum({
<FrontLossFlag =, DataSource =>
-
<FrontLossFlag ={'1'}, DataSource = {'DPW' , 'DEX (DPW)' }>} Real)
Hi Kushal
I would prefer not scripting me out of this. ![]()
Hi Angel
No I haven't, would you do that?