Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
CGJA
Creator II
Creator II

Sum of sales period dates HELP......

good day everyone.

My question or problem is how I can set fehas cutting?, Some formala I could support?? example, my variable is "FechaEmision" my SubTotalVentas variable amounts is, in this case January sales were invoiced from 1 February 2012 to February 10, 2012 that would be my month of January, the month of February would be up to 1 March 2012 to March 10, 2012 that would be my month of February and could do so as sucesibamente that these summations for court dates??

I hope I can support many grx

this is an example of how it is I'm trying to do that calculation

If (date (FechaEmision)>='01/02/2012' or (date(FechaEmision)= '10/02/2012'), sum (SubTotalVentas))as Enero,

2 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

I'm not sure I completely understand what you are trying to achieve.  Are you saying that any invoices issued in the first 10 days of the month are for the previous month's sales?  What about invoices issued after the 10th of the month?  And then you want to total the sales for each sales month?

Try this in your load script:

LOAD

     FechaEmision,

     SubTotalVentas,

     IF(Day(FechaEmision)<=10,Month(FechaEmision)-1,Month(FechaEmision))     AS     SalesMonth

FROM....;

Then, in your charts you could have SalesMonth as a dimension and Sum(SubTotalVentas) as an expression.

Hope this helps,

Jason

CGJA
Creator II
Creator II
Author

Hello good day jason.


Regarding your questions asked, here is set court dates is all that is billed. these are the dates


from 01/01/2012 to 02/10/2012 is January, I mean that everything is billed in this period or during cairia in January.


from 11/02/2012 to 10/03/2012 is February, as all that is billed in the period up to February or trancurso


11/03/2012 to 04/10/2012 is the March, like everything that is billed in this period corresponds to March or trancurso

thank you very much


and so I hope I have explained sucesibamente better without but for now I say goodbye and agradesiendo your kindness, I hope to continue to count on your support as I am new to this