Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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,

1 Solution

Accepted Solutions
sunny_talwar

Try it like this:

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

View solution in original post

1 Reply
sunny_talwar

Try it like this:

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