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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using firstsortedvalue

Hi,

I am using firstsorted value in a textbox.

When I do:

=FirstSortedValue(producto, -aggr(sum(venta),producto))

it works and I get the value P2 , now I want to know the sales of product P2:

=sum( { <producto={P2}> } venta )

But when I use that expresion:

=sum( { <producto={( =FirstSortedValue(producto, -aggr(sum(venta),producto)))}> } venta )

It doesn't work....

I don't know what is wrong, can anybody help me?

Thanks,

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try it like this:

=sum({<producto = {"$(=FirstSortedValue(producto, -aggr(sum(venta),producto)))"}>} venta)

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

Try it like this:

=sum({<producto = {"$(=FirstSortedValue(producto, -aggr(sum(venta),producto)))"}>} venta)