Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Field selected and next for calculates

Hi,

I have a question. I do a selection in a field. I need to do  calculates for this selection and this selection + 1(next)

For this selection is:

   count (<{field = $ :: field }> number)

How is It for selection + 1?

Thanks

5 Replies
stigchel
Partner - Master
Partner - Master

For next in Field Load Order you can use something like this

=Sum({<Field={'$(=FieldValue('Field',FieldIndex('Field',Field)+1))'}>} Amount)

Anonymous
Not applicable
Author

Hi,

It is a good answer, but I have a problem. I try explain my problem with a example.

I select field = 1, then other field(field3) has possible values 3,4,5

next select field = 2, for this value, field3 has posible values 4,6,7

My problem is as I selected field = 1, para field = 2 I have for field3 the value 4 because it is the equal value

¿How can I to do next select field = 2 with all the values possibles for field3?

I don´t know if I explain good my problem. My english is very bad, sorry

Thanks

stigchel
Partner - Master
Partner - Master

Hi Jonay,

It is indeed difficult to understand what you want exactly, but maybe I can point you in the right direction. Consider the following:

SubField(Concat({DISTINCT field3,'@'),'@',2)

What it does is that the possible values of field3 are concatenated into one string with delimiter @ , The subfield then picks the second possible value from this string. The concat function by default will use the load order, but you could use a third parameter for this function to sort it differently should you want to

Anonymous
Not applicable
Author

Hi,

I try explain my problem

If I select field with value 1, field3 has values 3,4,5

If I select field with value 2, field3 has values 4,6,7

Both have the value 4

If I select field with value 1 and I do next selected field, for field = 2, field3 will be only value = 4, because I have field selected with value  1

I need that for next selected field, the values are 4,6 y 7 because these are the values of field = 2. But as I have selected field = 1, I have field3 = 4 only

Wait, that you understand my problem now

Thanks

stigchel
Partner - Master
Partner - Master

I,m sorry but that does not make sense at all, can you prepare a sample qvw that demonstrates the problem with the above example? An object with a dimension and a expression that gives you the wrong outcome and tell me what the outcome of the expression should be.?