Qlik Community

Qlik Brasil

Group community for Brazil users. discussion only in Portuguese.

Highlighted
ronald_gdi
New Contributor III

Problem with Sum and Set Analisys

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

Tags (1)
5 Replies
MVP
MVP

Re: Problem with Sum and Set Analisys

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])

MVP
MVP

Re: Problem with Sum and Set Analisys

1.png


the expression


Sum({<Mês=,Ano=,Data={"$(vDataPesquisaRED)"}>} [Pontos Conquistados])

/

Sum({<Mês=,Ano=,Data={"$(vDataPesquisaRED)"}>} [Pontos Possiveis])

and the variable


=Date(Max(Data))

ronald_gdi
New Contributor III

Re: Problem with Sum and Set Analisys

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

ScreenHunter_02 Mar. 08 22.45.gif

ronald_gdi
New Contributor III

Re: Problem with Sum and Set Analisys

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

ScreenHunter_02 Mar. 08 22.45.gif

Employee
Employee

Re: Problem with Sum and Set Analisys

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.

Como obter ajuda? Leia antes de postar