Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Paula1
Creator
Creator

Eu preciso criar aggr com FirstSortedValue não consigo

set análises errado

FirstSortedValue({1< [MesAno] = {'dez 2021'},[Flagx] = {'1'}>} PRECOUNITARIO,-horab)

Como está no qvw abaixo.

2022-02-18_09-22-03.jpg

O resultado que deveria ficar correto.

Produto CODIGOGRUPO CODIGOMATERIAPRIMA Quantidade Result
212 12 3 10,000  
212 12 18 0,006 18,8491
212 12 78 0,002 8,103
212 12 114 0,013 18,636
212 12 151 1,000 4,60547
212 12 162 15,000 0,0063
212 12 202 0,027 5,034219
212 12 643 1,000 0,0065
212 12 705 15,000 0,0238
212 12 1164 0,816 0,245714
         
Paula Santos
vitória - ES
Labels (1)
5 Replies
Paula1
Creator
Creator
Author

Help 😥

Paula Santos
vitória - ES
Paula1
Creator
Creator
Author

aggr(FirstSortedValue([PRECOUNITARIO],-Aggr(Min({<[MesAno]={'dez 2021'} >}horab),Produto,CODIGOGRUPO,CODIGOMATERIAPRIMA)),Produto,CODIGOGRUPO,CODIGOMATERIAPRIMA) 

Não deu certo... HELP

Paula Santos
vitória - ES
rubenmarin

Hi, I don't understand your requirements. There is no data for product 212 and [MesAno]='dez 2021' and [Flagx]=1.

If you are using {1} in your expressions, meaning that you want to ignore selections, then usually this is better be done in script, creating auxiliary mapping tables and using applymap to assing the value to each record. This will help to create simpler expressions on design.

Michael_Tarallo
Employee
Employee

@MarcoWedel can you assist?

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

Hi @Miguel_Angel_Baeyens is this something you can help with?

Regards,
Mike Tarallo
Qlik