Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get Expression Value from Another Object in a Sheet

Hi QV Experts! ... and Masters

I have this Segmentation table:

city segment.PNG

I got the City from data loading process, and I add the Segment Area column using expression in the table using some calculation.

=If(Score >= 100, 9, If(Score >= 1000, 8, ...

Btw, I hid the Score column; which is also get it from data loading process.

Now I create in the same sheet, a text box object to count "How many cities currently in the Segment Area?" as you can see below:

textbox segarea.PNG

It doesn't work the way I want.

How can I get the count of "How many cities currently in the Segment Area?" and put it in the text box?

Please help. Thanks in advance!

1 Solution

Accepted Solutions
Not applicable
Author

Turns out I need to export it first using script and read it again.

This question is solved.

Thanks

View solution in original post

9 Replies
Not applicable
Author

How many cities currently in the Segment Area

IN CHART --> EXPRESSION

WRITE

expression1--

If(Score >= 100, 9, If(Score >= 1000, 8, ...

expression2--

count(IF([Segment Area]<>0,City))

Gysbert_Wassenaar

Try count({<Score={'>=100<1000'}>} City)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Vish!

I don't wanna put it in the chart/straight table, but I need to display the count number in the TEXT BOX.

How can I do this?

Thanks.

Not applicable
Author

in text object write this

count(if(Score>=100,City))

sushil353
Master II
Master II

is it what you are looking for.

Please find attached.

HTH

Sushil

Not applicable
Author

Hi Gysbert!

Sorry to tell you but it doesn't seem to work.

Since the Segment Area is already calculated in the TABLE, can I use the GetObjectField() function?

How to do it?

Not applicable
Author

Hi Sushil!

I got the City from data loading process, and I add the Segment Area column using expression in the table using some calculation.

=If(Score >= 100, 9, If(Score >= 1000, 8, ...

Btw, I hid the Score column; which is also get it from data loading process.

I guess you've missed that I get the segment area using expression.

Thanks.

Not applicable
Author

hope this helps you

firstly write this code in script

If(Score >= 100, 9, If(Score >= 1000, 8, ...) as [Segment area]

then in text box write this below code

count(Total <[Segment area]>City))

Not applicable
Author

Turns out I need to export it first using script and read it again.

This question is solved.

Thanks