Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to apply my IF formula to all the my field list :
if(
Material=Exclusion_Mat_PGI_Copy,Exclusion_LIVING_FLAG_SCOPE,
if(
Material<>Exclusion_Mat_PGI_Copy,LIVING_FLAG_SCOPE
))
Here it's stoping at one value.
Is there any equivalent of For Each that can I use it in my expressions please ?
Thank you in advance for your help.
Best regards, Arun
Hi Arun,
A liitle back ground please. Is material and Exclusion_Mat_PGI_Copy are fields , what exactly are you looking for? In which object are yiu using it ? Giving you an answer without context may not help you.
Thanks
Pradosh
Hi,
Try to put the values in quotes, i.e. Material='Exclusion_Mat_PGI_Copy'
Thanks
Monika
Shouldn't it be like:
IF(Material='Exclusion_Mat_PGI_Copy', Exclusion_LIVING_FLAG_SCOPE, LIVING_FLAG_SCOPE)
You can also provide a sample data with expected outcome to make it easier for us.
Hi Pradosh Thakur,
Yes you are right...
Here is the Expression measure that I am using :
sum(aggr(if($(vExclusion_Scope)<>'NO',1,0),Material))
Here vExclusion_Scope it's a variable that is equal to :
if(
Material=Exclusion_Mat_PGI_Copy,Exclusion_LIVING_FLAG_SCOPE,
if(
Material<>Exclusion_Mat_PGI_Copy,LIVING_FLAG_SCOPE
))
Here "Material", "Exclusion_Mat_PGI_Copy", "Exclusion_LIVING_FLAG_SCOPE" and "LIVING_FLAG_SCOPE" are fields.
There are duplicate values in the "Material" field.
The Expression measure, here stop calculating when he finds is firts Value...
I hope I have been clear.
Thank you again.
Best regards, Arun
Try this first
sum( total aggr(if($(vExclusion_Scope)<>'NO',1,0),Material))
Here you can on the left you the numbers missing for the "ATR", "A330", and "BelugaXL". It should be like the right one.
No it's not working because as there are duplicate values in the field "Measure", please the picture above when I use sum( total aggr(if($(vExclusion_Scope)<>'NO',1,0),Material))
As there are duplicates in Material field your expression is not calculating properly. Try the below then may be share a sample app, sample app can define your problem and need be the actual app with data
sum(aggr(nodistinct if($(vExclusion_Scope)<>'NO',1,0),Material))
Here Pradosh,
I created a sample...
Thank you again for your help.
Best regards, Arun