Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Hi Carlo,
Try following with set analysis.
=Only( {< Panta='{'A'} >} Avance)
Marc
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)
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!
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
You can try this too:
= Sum(IF(Match(Planta, 'A', 'B'), Avance))
OR
= Sum(IF(Planta = 'A', Avance))
=Sum(If(Wildmatch(Planta,'A'),Avance))
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.
=sum({<Planta ={"$(=GetFieldSelections(Planta))"}>} Advance)