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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Subfield function inside set analysis

Hi dev people,

I have been trying several hours make to work the expression: 

 

 

=Sum( {< Producto={$(=subfield(vProducto,' (',1))}>} Precio)

In vProducto is stored 'Producto1 (200)'

I have also tried:

=Sum( {< Producto={$(=subfield('Producto1 (200)',' (',1))}>} Precio)

and it does not work either.

If i try:

=Sum( {< Producto={'Producto1'}>} Precio)

it works.

It seems that the subfield expression or the variable is not well resolved. Any ideas?

Thank you!!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding quotes around the dollar-expansion:

=Sum( {< Producto={"$(=subfield(vProducto,' (',1))"}>} Precio)


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding quotes around the dollar-expansion:

=Sum( {< Producto={"$(=subfield(vProducto,' (',1))"}>} Precio)


talk is cheap, supply exceeds demand
Not applicable
Author

try this

=Sum( {< Producto={'$(vProducto)'}>} Precio)

or this

=sum({<product={"$(=subfield(vProducto,'(',1))"}>}Precio)

Not applicable
Author

Gysbert, you´r my hero

It works!!,

Thank you very much.