Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
silvia_assuncao
Creator
Creator

calculate variation between days and include chart

Hi,

I have a chart with values by day and I'd like to include the variations between the current and previous days.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Silvia,

Use above to calculate de variance.

(SUM({$<[ANO DO PREGAO] = {'2016'},[MES PREGAO]={'09'}>}([PREULT - PREÇO DO ÚLTIMO NEGÓCIO DO PAPEL-MERCADO NO PREGÃO])/100))-

Above((SUM({$<[ANO DO PREGAO] = {'2016'},[MES PREGAO]={'09'}>}([PREULT - PREÇO DO ÚLTIMO NEGÓCIO DO PAPEL-MERCADO NO PREGÃO])/100)))

And on CODNEG - CÓDIGO DE NEGOCIACAO DO PAPEL put a conditional view:

With this condition: iF(GetSelectedCount([CODNEG - CÓDIGO DE NEGOCIACAO DO PAPEL])=1,False(),True())

Regards!

View solution in original post

10 Replies
MarcoWedel

71.5MB ?

Anil_Babu_Samineni

Would you share the expression which you wrote overthete, because the file size is huge. And after that tell that which you face the problem I that graph

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

OMG 75 MB

Can u please share small file that tells ur requirement.

- Nagarjun

sushil353
Master II
Master II

Hi,

If you simply want to show the difference of two consecutive rows of information (day to day) the you can use above() function in your chart..

or share the expression with more clear requirement..

HTH

Sushil

Anonymous
Not applicable

Use Column label for variance calculation, something like this?

Variance column in QlikView - Stack Overflow

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi I have checked ur application:

May be like this?

Try this...

=If(Aggr(NODISTINCT RowNo(), [DIA PREGAO],[CODNEG - CÓDIGO DE NEGOCIACAO DO PAPEL]) > 0, RangeSum((SUM({$<[ANO DO PREGAO] = {'2016'},[MES PREGAO]={'09'}>}([PREULT - PREÇO DO ÚLTIMO NEGÓCIO DO PAPEL-MERCADO NO PREGÃO])/100)) - Above(TOTAL (SUM({$<[ANO DO PREGAO] = {'2016'},[MES PREGAO]={'09'}>}([PREULT - PREÇO DO ÚLTIMO NEGÓCIO DO PAPEL-MERCADO NO PREGÃO])/100)))))

It will give you the diff between previous day to current day.

I hope this may help.

- Nagarjun

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Note :

Sort the day in Asc Mode.

-Nagarjun

Anonymous
Not applicable

Hi Silvia,

Use above to calculate de variance.

(SUM({$<[ANO DO PREGAO] = {'2016'},[MES PREGAO]={'09'}>}([PREULT - PREÇO DO ÚLTIMO NEGÓCIO DO PAPEL-MERCADO NO PREGÃO])/100))-

Above((SUM({$<[ANO DO PREGAO] = {'2016'},[MES PREGAO]={'09'}>}([PREULT - PREÇO DO ÚLTIMO NEGÓCIO DO PAPEL-MERCADO NO PREGÃO])/100)))

And on CODNEG - CÓDIGO DE NEGOCIACAO DO PAPEL put a conditional view:

With this condition: iF(GetSelectedCount([CODNEG - CÓDIGO DE NEGOCIACAO DO PAPEL])=1,False(),True())

Regards!

silvia_assuncao
Creator
Creator
Author

Great! worked! thanks