Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problems with time interval month

Hello everyone,

I just wrote about it but without success .... rephrase the question.

In an application I have to analyze the sales turnover of the past years and the current year.

For the past years I have used the following syntax

sum ({<= FV_Tipo, Year = {$ (= max ({1} Year) -2)}>} FV_Imponibile_FAT)                    turnover in 2013

sum ({<= FV_Tipo, Year = {$ (= max ({1} Year) -1)}>} FV_Imponibile_FAT)                    turnover in 2014

sum ({<= FV_Tipo, Year = {$ (vMaxAnno)}>} FV_Imponibile_FAT)                                turnover in 2015

and until everything is right

the problem is now in turnover in 2015 there are also invoices for the current month (for example March)

I turnover 2015 (formula below)

sum ({<= FV_Tipo, Year = {$ (vMaxAnno)}>} FV_Imponibile_FAT)

I would remove the invoices for the current month so:

sum ({<= FV_Tipo, Year = {$ (vMaxAnno)}>} FV_Imponibile_FAT) - sum ({<= FV_Tipo, Month = {$ (vMaxMese)}>} FV_Imponibile_FAT)

What should I put in place of the part highlighted in red so that the chief and take off from the total invoices for the current month?

Someone help me would know ... it's a bit urgent!

Thanks to all in advance.

10 Replies
rubenmarin

Ok, I made less than the selected month, if you want less than the current real month you should change vMaxMese variable to:

=Num(Month(Today()))

You can, but you don't need,substract the invoices for the current month, just ask in the expression all invoices less than the current month.

sum({<FV_Tipo=, Anno={$(vMaxAnno)}, MeseNum={"<$(vMaxMese)"}> } FV_Imponibile_FAT)

Sorry for misunderstanding and late answer. I also recomend to change variable name to vCurrentMese or something similar in your language.