Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I need to build a chart that compares the total (multiple) items I choose in a list box (left) with a specific item from another list box (right). There are two list boxes, one with the items that will compose the total (blue bar) and another list box only with the items that I need to compare (red bar). I tried as it is on qvw but it did not work.
Please add 2 island field.
Test:
LOAD YEAR(DATA_LANCAMENTO) as Ano,
DESCRICAO_LANCAMENTO as "Lancamento",
DESCRICAO_LANCAMENTO as "Lancamento2",
DATA_LANCAMENTO as Data,
VALOR_TRANSACAO as Valor,
if(NATUREZA_LANCAMENTO='C','Crédito',if (NATUREZA_LANCAMENTO='D','Débito','Dep. bloqueado')) as "Tipo de Lancamento"
FROM
[Test.qvd]
(qvd);
List:
NoConcatenate
LOAD
if([Tipo de Lancamento]='Crédito',Lancamento) as List1
Resident Test;
List2:
NoConcatenate
LOAD
if([Tipo de Lancamento]='Crédito',Lancamento2) as List2
Resident Test;
On the UI, your expressions will be
1) =Sum({< [Tipo de Lancamento] = {'Crédito'}, Lancamento = {"$(=concat(List1, '","'))"} >} Valor)
2) = Sum({< Lancamento = {"$(=concat(List2, '","'))"}, [Tipo de lancamento] = {'Crédito'} >} Valor)
Please add 2 island field.
Test:
LOAD YEAR(DATA_LANCAMENTO) as Ano,
DESCRICAO_LANCAMENTO as "Lancamento",
DESCRICAO_LANCAMENTO as "Lancamento2",
DATA_LANCAMENTO as Data,
VALOR_TRANSACAO as Valor,
if(NATUREZA_LANCAMENTO='C','Crédito',if (NATUREZA_LANCAMENTO='D','Débito','Dep. bloqueado')) as "Tipo de Lancamento"
FROM
[Test.qvd]
(qvd);
List:
NoConcatenate
LOAD
if([Tipo de Lancamento]='Crédito',Lancamento) as List1
Resident Test;
List2:
NoConcatenate
LOAD
if([Tipo de Lancamento]='Crédito',Lancamento2) as List2
Resident Test;
On the UI, your expressions will be
1) =Sum({< [Tipo de Lancamento] = {'Crédito'}, Lancamento = {"$(=concat(List1, '","'))"} >} Valor)
2) = Sum({< Lancamento = {"$(=concat(List2, '","'))"}, [Tipo de lancamento] = {'Crédito'} >} Valor)
You can as well set your second list box (List2) to have "always one selected value"
Thanks a lot! Works fine 🙂
Great. Happy to help!
When you get a chance, please Mark the question as answered.