Good day, I need help with something, some time ago I did a calculation in Qlik Sense to know the expenses of the last 12 months. In other words, if I verify
December 2018 = I must obtain the expenses from December 2017 until November 2018.
January 2019 = I must obtain expenses from January 2018 to December 2018 and so on every month.
Now I need help with something, I think it's a bit more complex, I need to add a condition for the calculation, let's say that in January I had 9 different expenses, in February I had the same 9 expenses and 23 new expenses, in March the same ones mentioned above and 10 new expenses and so on.
What I need is to calculate the expenses of the last 12 months as long as the expenses have been made 12 or more times.
I add an excel file where I have the columns:
* Expenses: is a name or a consecutive that identifies the expenses incurred.
YEAR_: in which the expenditure is made for the first time.
N_MES: in which the expenditure is made for the first time.
N_Year: in which the expense was repeated.
MES_RECUPERACION: in which the expense was repeated.
Fechab: is the column where the year and the month of repetition of the expenditure are concatenated.
RECOVERED: It is the column where the value of the expense is positive or negative.
CANT_MESES, is where I can see the amount of times the expense has been repeated.
As an example of the error I have and what I should do, I place two additional columns:
The value that Qlik Sense takes and the value it should take.
In both you can see the formula with the cells that add up.
The value that Qlik Sense brings out, shows a value in making this formula
Suma ({<N_YEAR, MONTH_RECUPERATION =, dateb = {"> = $ (= date (addmonths (max (dateb), - 12), 'YYYY-MM-DD')) <$ (= date (max (dateb) , 'YYYY-MM-DD')) "}>} If (CANT_MESES> = 12, RECUPERADA))
I hope to help me, because I have been trying for several days to solve it.
Thank you all
Can you please advise in your excel what all records gives you 39874 for January 2016 and 283891 for February 2016.
Excuse me I do not understand what you want to tell me.