Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to get a previous value in a text object

Hi,

I have a field D which has values 1 to 20

Now i created a Text object in that if i select an value 7.The previous value of 7 i.e., 6 want to appear on the text object please clarify my doubt.

Thanks in advance.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If the numbers are sequential, then in a text box

=Value - 1

If they are not, then

=Max({<Value = {"<$(=Max(Value))"}>} Value)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

13 Replies
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

I don't understand so much, with =D-1 you could get the result, but I think I'm missing somethings

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If the numbers are sequential, then in a text box

=Value - 1

If they are not, then

=Max({<Value = {"<$(=Max(Value))"}>} Value)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hi,

Yes You are correct exactly my requirement is I have an field D

example :

D

1

2

3

4

5

6

7

If i click any number from 1 to 7 I want get sum of all above numbers.

for example : If I select 4 i want get sum of all above numbers of 4 i.e.,1+2+3=6

in a text object.

sujeetsingh
Master III
Master III

Hello see the sample .

I have done it from script

rustyfishbones
Master II
Master II

Yes BBI_MBA_76 is correct

=D-1 shoud give you the answer

Anonymous
Not applicable
Author

Hi,

Yes You people were correct exactly my requirement is I have an field D

example :

D

1

2

3

4

5

6

7

If i click any number from 1 to 7 I want get sum of all above numbers.

for example : If I select 4 i want get sum of all above numbers of 4 i.e.,1+2+3=6

in a text object.

bbi_mba_76
Partner - Specialist
Partner - Specialist

=Sum({<D = {"<$(=Max(D))"}>} D)

Anonymous
Not applicable
Author

Thank you very much for your reply

another doubt

if we want this answer in table view with D as dimension the same expression will work or we want to make any changes for that..?

bbi_mba_76
Partner - Specialist
Partner - Specialist

With a chart you could use the full accumulation