Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am using below expression its showing ok but the result is not coming.
if(only({<JNum={">=$(=vStartDate)<=$(=vEndDate)"},
[RC]={'IN'},[Inl]={'Out'}>} [ID])=0,'Not',[ID])
but if I use this its working fine enough
only({<JNum={">=$(=vStartDate)<=$(=vEndDate)"},
[RC]={'IN'},[Inl]={'Out'}>} [ID])
if I add the IF condition its not working what is the issue?
I think you missed else part ..
No,
ID is else part
its there 'Not',[ID])
Then you should use here aggregate function
Try this..
if(only({<JNum={">=$(=vStartDate)<=$(=vEndDate)"},
[RC]={'IN'},[Inl]={'Out'}>} [ID])=0,'Not',Count([ID]))
no PM.
it will give me the 1,1,1,1 like that but I want to see that value count it will not work
Only returns only one values has been allocate else it will return Null. So, To over come this, Perhaps this may do job
if(Count(Aggr(only({<JNum={">=$(=vStartDate)<=$(=vEndDate)"},[RC]={'IN'},[Inl]={'Out'}>} [ID]), Field))=0,'Not',[ID])
its not working anil,
Yes, I know that . Where are you trying this? As i already stated it should not be Only. Can you explain your needed?
hmm,
I am using same exp in kpi object its working
when its come to straight table its not working.
You have to cover all Dimension to aggregate functions like
if(Count(Aggr(only({<JNum={">=$(=vStartDate)<=$(=vEndDate)"},[RC]={'IN'},[Inl]={'Out'}>} [ID]), Dim1, Dim2, Dim3))=0,'Not',[ID])