Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
brunopaulo
Partner - Creator II
Partner - Creator II

List top Product in text box

Hi community, im trying listing the top product using the following expression.

='O produto mais vendido de ' & max(YEAR) & ' é o ' & concat(aggr(if(rank('Sum({$<YEAR={$(=Max(YEAR))}>}  (ValorVenda))'<2, Produto), Produto),',')

I ccant find the error. can anyone help me? Thank you!

Best Regards

6 Replies
sunny_talwar

May be try this

FirstSortedValue(Produto, -Aggr(Sum({$<YEAR={$(=Max(YEAR))}>} ValorVenda), Produto))

sunny_talwar

Or this

Concat(Aggr(If(Rank(Sum({$<YEAR={$(=Max(YEAR))}>} ValorVenda)) < 2, Produto), Produto), ', ')

brunopaulo
Partner - Creator II
Partner - Creator II
Author

As usuall, perfect solution. Now how can i put dat in bold?

Thank you for the help

sunny_talwar

Put what in bold?

brunopaulo
Partner - Creator II
Partner - Creator II
Author

the product.

sunny_talwar

From what I understand, either you can format the whole KPI object or nothing.... if you are okay to highlight the whole thing, you should be able to format the text by adding bold... I am not a Qlik Sense expert, but if you don't know where it is, I can check that for you.