Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to use a variable in count function against certain validations.
For example
I made a variable test in set analysis with the following conditions.
if(marks>90,1,if(marks>50 and marks<=89,2,3))
I want to use this variable in count function in the expression editor,
count({$<$(temp)={1,2}>})
This way is not working for me, kindly suggest someway else
suppose,
you made variable temp= if(marks>90,1,if(marks>50 and marks<=89,2,3))
and now you want to use temp in count as count({$<$(temp)={1,2}>})
can you please explain what is your requirement
I suggest you working in the script creating a new field in your data model:
LOAD
...
if(marks>90,1,if(marks>50 and marks<=89,2,3)) as new_field
then in front end you can use a set analysis in your expression as below:
Count( {< new_field = {'1','2'} >} your_field )
Hope this helps.
Hi Andrea,
Expression I am using is :
(Month(AddMonths (Date( Date#(HIRE_DATE,'MM/DD/YYYY'),'MMM'),1)))
My hiredate is field is the field when a particular employee is hired in 'MM/DD/YYYY' format.
I tried to make a filed out of it but am unable to do so. Though its giving me the desired result at frontend .
it's still not clear for me.
what's your "marks" field you mentioned above ?
could you share your script ?
and what's your expected result in the front end ?
Hi Andrea,
The marks field I took was just for example. I am not able to run the expression (Month(AddMonths (Date( Date#(HIRE_DATE,'MM/DD/YYYY'),'MMM'),1))) where HIRE_DATE is any date field in the expression editor.