Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis with dimension variable

Hi all,

I'm editing a text object with this expression:

=count(distinct {<v_bo_delta_create={'<=$(=v_bo_marg_inf_create)'}, elem_tech_code={'BO'}, elem_type_code={'UNI'}>} elem1_sk)

where

v_bo_delta_create=num(round(Today()-(MAX(elem_updatedt))))

v_bo_marg_inf_create is an input box. Current value is 100.


This expression doesn't work.


I also tried with " "

=count(distinct {<v_bo_delta_create={"<=$(=v_bo_marg_inf_create)"}, elem_tech_code={'BO'}, elem_type_code={'UNI'}>} elem1_sk)

but doesn't work.


I think problem are variables.

I looked at this thread Set Analysis - Dimension as variable but doesn't help me very much.


Any ideas?

Thanks


2 Replies
sunny_talwar

What about one of these:

=Count(DISTINCT {<v_bo_delta_create = {"$(='<=' & $(=v_bo_marg_inf_create))"}, elem_tech_code={'BO'}, elem_type_code={'UNI'}>} elem1_sk)

or

=Count(DISTINCT {<v_bo_delta_create = {"$(='<=' & $(v_bo_marg_inf_create))"}, elem_tech_code={'BO'}, elem_type_code={'UNI'}>} elem1_sk)

Anonymous
Not applicable
Author

Those expressions return same value even if v_bo_delta_create is > then v_bo_marg_inf_create.

I try to explain:

v_bo_marg_inf_create = 100

v_bo_delta_create = 70


both expressions returns a value (429).


But if i set

v_bo_marg_inf_create = 60

v_bo_delta_create = 70

i suppose that correct returned value is 0 because the clause v_bo_delta_create <= v_bo_marg_inf_create is not verified, instead the returned value is always 429.


Where I am wrong?

Thank you