Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Looking for Last month sum and Average

Hello,

I have tried to obtain the last month data...(August in this case) sum and average can you help me with this?

Count({<Mes={'Date#(Month(today()))'},Datos={">0"}>} Datos)  (This give value = 0)

Sum august have to be = 11654,47

and Avg = 685,5570588

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

Just need to change the set analysis

= Count({<Date={'>=$(=monthend(today(),-1))<$(=monthend(today()))'},Datos={">0"}>} Datos)

to this

= Count({<Date={'>$(=monthend(today(),-1))<$(=monthend(today()))'},Datos={">0"}>} Datos)

In the first expression, you're getting 31/07/2015 till 31/08/2015

View solution in original post

4 Replies
Gysbert_Wassenaar

Your month values are just text values, not dates or in any other way recognizable to qlikview as months. So you'll either have to turn those into something useful or use the Date field instead in an expression like Count({<Date={'>=$(=monthstart(today(),-1))<$(=monthstart(today()))'},Datos={">0"}>} Datos).


talk is cheap, supply exceeds demand
pgalvezt
Specialist
Specialist
Author

Hi Gysbert,

Thank you for your reply,

Look with your anlysys I did this:

= Count({<Date={'>=$(=monthend(today(),-1))<$(=monthend(today()))'},Datos={">0"}>} Datos)

But the final result gives 18...

it is assumed that the value must give 17

What I want is the sum of August and average

You can check August here (the page is in spanish sorry about that)

DOLAR OBSERVADO 2015

Anonymous
Not applicable

Hi,

Just need to change the set analysis

= Count({<Date={'>=$(=monthend(today(),-1))<$(=monthend(today()))'},Datos={">0"}>} Datos)

to this

= Count({<Date={'>$(=monthend(today(),-1))<$(=monthend(today()))'},Datos={">0"}>} Datos)

In the first expression, you're getting 31/07/2015 till 31/08/2015

pgalvezt
Specialist
Specialist
Author

Thank you very very much!