Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i am facing some issue recording Compare the variable values to field values
like i have one variable like -----Vemp='ram'
now i have one table like empid empname deptid salary
1 ram 10 5000
2 kiran 11 15000
3 ravi 10 25000
4 kumar 12 35000
now i need to compare variable value to empname field values
like if(empname='$(Vemp)',Deptid,'No Data')
but here i am not able to compare the all fields values to variable values
Could you please suggest the best way
Thanks,
Brahma
Try
=Alt( Only({<empname={'$(Vemp)'}>} deptid), 'no data')
Thanks swuehl ,
it"s working for deptid but
let as assume in table now added a new feild like "referencename"
feilds ---- empid empname deptid salary referencename
1 ram 10 5000 bobby
2 kiran 11 15000 hari
3 ravi 10 25000 kasi
4 kumar 12 35000 veeru
=Alt( Only({<empname={'$(Vemp)'}>} deptid), 'no data')--it is working good for Deptid
but when i was trying to get related "referencename" feild value it showing 'nodata'
=Alt( Only({<empname={'$(Vemp)'}>} referencename), 'no data')
Could you please suggest the best way
Thanks,
Brahma
Hi Brahmaiah,
Please use the below expression
SET Vemp='ram'; // declare at edit script
=if(empname=Vemp,deptid,'NoData') // i used this exp at straight table in dimension tab
(or)
=if(empname='$(Vemp)',deptid,'NoData')
i hope this will help you...
Thanks SubbaReddy ,
it will work but
I need to create all the things in variable level.even "=if(empname=Vemp,deptid,'NoData')"--this function also i need to in create variable level
Thanks,
Brahma
Declare variable vName and assign vName='Ram'
in the straight Chart->Calculated dim (=if(Name=vName,ID)
Expression-->Only(ID) Only(Sal)
Hop this will help you.....