Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with many rows
Format Data = DD/MM/YYYY
Fields: Data <> Pontos Possiveis <> Pontos Conquistados
Rows: 01/01/2016 20 10
01/02/2016 20 20
I have this expression
Sum({<Mês=,Ano=,Data={"=$(vDataPesquisaRED)"}>} [Pontos Conquistados)
/
Sum({<Mês=,Ano=,Data={"=$(vDataPesquisaRED)"}>} [Pontos Possiveis])
The variable vDataPesquisaRED return the Max Date
The result would be 1, because (20 / 20)
But my results is 0,75, because (30 / 40)
I don't know why the Qlik return 0,75, the correct is 1
Can someone help me?
Kind regards
Can you try this without the variable:
Sum({<Mês=,Ano=,Data={"$(=Date(Max(Data)))"}>} [Pontos Conquistados)
/
Sum({<Mês=,Ano=,Data={"$(=Date(Max(Data)))"}>} [Pontos Possiveis])
the expression
Sum({<Mês=,Ano=,Data={"$(vDataPesquisaRED)"}>} [Pontos Conquistados])
/
Sum({<Mês=,Ano=,Data={"$(vDataPesquisaRED)"}>} [Pontos Possiveis])
and the variable
=Date(Max(Data))
This option doesnt' work too.
If I put AGGR command into a Aggregate Dimension:
Aggr(Sum({<Mês=,Ano=,Data={"$(=Date(Max(Data)))"}>} [Pontos Conquistados)
/
Sum({<Mês=,Ano=,Data={"$(=Date(Max(Data)))"}>} [Pontos Possiveis),Data)
This code returns a table containing the calculated data by date. And I need to catch the last month , I need to add another code. I do not know.
I have a example with real data
This option doesnt' work too.
If I put AGGR command into a Aggregate Dimension:
Aggr(Sum({<Mês=,Ano=,Data={"$(=Date(Max(Data)))"}>} [Pontos Conquistados)
/
Sum({<Mês=,Ano=,Data={"$(=Date(Max(Data)))"}>} [Pontos Possiveis),Data)
This code returns a table containing the calculated data by date. And I need to catch the last month , I need to add another code. I do not know.
I have a example with real data
Já achou uma solução? Se alguma resposta foi a correta, marque como "Correta" para fechar o tópico e nos ajudar a manter o forum organizado.