Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, guys.
My set analysis:
sum({<_C3Meses_VENDAS_={1},DES_CD={'$(=FirstSortedValue(DES_CD,-(aggr(sum({<_C3Meses_VENDAS_={1}>}VB),DES_CD,BANDEIRA)),1))'}>}VB)
don't work.
if i isolate the expression //// =FirstSortedValue(DES_CD,-(aggr(sum({<_C3Meses_VENDAS_={1}>}VB),DES_CD,BANDEIRA)),1)) //// , it work normally.
any sugestion?
thz!
André
Hi @AndreFrencl ,
I understood now what you are trying to achieve.
You should use double quotes:
sum({<_C3Meses_VENDAS_={1},DES_CD={"$(=FirstSortedValue(DES_CD,-(aggr(sum({<_C3Meses_VENDAS_={1}>}VB),DES_CD,BANDEIRA)),1))"}>}VB)
Not sure it will fix the problem, but single quotes are reserved for literal strings, and double quotes are used when some kind of search or function is applied.
Let me know if it fixes the issue.
Regards
Hi @AndreFrencl ,
can you give us an example of what you are trying to achieve? And what kind of data?
Usually, in my experience, FirstSortedValue is more commonly used to get a string, which you cannot sum, otherwise you would use the Max function.
If you can give us examples maybe we can help 😉
hi, @jberna26
the function
=FirstSortedValue(DES_CD,-(aggr(sum({<_C3Meses_VENDAS_={1}>}VB),DES_CD,BANDEIRA)),1))
the function bring to me a string, like "RS", "AP", "CO", ....
so, my goal is like this:
sum({<_C3Meses_VENDAS_={1},DES_CD={'RS'}>}VB)
both functions works, but not together.
(sorry my english)
Hi @AndreFrencl ,
I understood now what you are trying to achieve.
You should use double quotes:
sum({<_C3Meses_VENDAS_={1},DES_CD={"$(=FirstSortedValue(DES_CD,-(aggr(sum({<_C3Meses_VENDAS_={1}>}VB),DES_CD,BANDEIRA)),1))"}>}VB)
Not sure it will fix the problem, but single quotes are reserved for literal strings, and double quotes are used when some kind of search or function is applied.
Let me know if it fixes the issue.
Regards