Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data not shown in text object

Hello

I was hopping you could help me with the next issue.

1. I have the following data, which is in a normal excel sheet with no spaces within words.

2. Then, when I create a text object with the following expression: =IF(Planta='A', Avance) I have just as result the text object like fi there was no data to show:

Please someone could help me? This is driving me crazy and I am not capable to detect the problem.

Thank you and best regards!

8 Replies
marcginqo
Partner - Creator
Partner - Creator

Hi Carlo,

Try following with set analysis.

=Only( {< Panta='{'A'} >} Avance)

Marc

vishsaggi
Champion III
Champion III

Another Way would be

= Sum({< Planta = {'A'} >} Avance)

Or you want to make it dynamic like based on selections in your Plant field listbox try below:

Based on your selections in your listbox Planta the values will change in your textbox.

= Sum({< Planta = {'$(=GetFieldSelections(Planta))' } >} Avance)

Anonymous
Not applicable
Author

Thanks both of you! it worked. What I dont understand now is why this kind of expression worked for me in the past without using set analysis.

Best regsards!

marcginqo
Partner - Creator
Partner - Creator

Hi Carlo,

When you would use this expression it will work too. This one is even better because it would sum the Avance even when there are multiple lines with the same Panta.

=AGGR(IF(Panta='A', SUM(Avance)),Panta)

Marc

vishsaggi
Champion III
Champion III

You can try this too:

= Sum(IF(Match(Planta,  'A', 'B'), Avance))

OR

= Sum(IF(Planta = 'A', Avance))

qlik4asif
Creator III
Creator III

=Sum(If(Wildmatch(Planta,'A'),Avance))

tresesco
MVP
MVP

IF is not an aggregation function and it can't return a valid result from multiple records but null. That means, if you select one record, you would see true/false result based on your if expression, whereas, when more records are there in the scope, it would return null. The thumb rule is, to get result from multiple records, use aggregation function along with/without other non-aggregated functions.

shiveshsingh
Master
Master

=sum({<Planta ={"$(=GetFieldSelections(Planta))"}>} Advance)