Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
s_santalucia
Partner - Creator
Partner - Creator

Monthend and Monthstart- QS

Hello

in my analysis

I want to calculate the sales on the first day of the month (01/07/2018) and the last day of the month (31/07/2018), of all the months.


can u help me?


Thanks




8 Replies
s_santalucia
Partner - Creator
Partner - Creator
Author

Ex.

francescoreggia
Partner - Contributor III
Partner - Contributor III

Hi Stefania,

in script create a new dummy field like

if( Date = MonthStart(Date) or Date = MonthEnd(Date),1,0 ) as flag_StartEnd,

ecc...

then in front end use

sum({<flag_StartEnd={1}>} sales )

s_santalucia
Partner - Creator
Partner - Creator
Author

Thanks!!!!! 

s_santalucia
Partner - Creator
Partner - Creator
Author

and to add sales on the first day of the month and the last day? I created a table as in the picture I attached

francescoreggia
Partner - Contributor III
Partner - Contributor III

if use sum({<flag_StartEnd={1}>} sales )  on table's expression,  all other days show 0 value,correct?

francescoreggia
Partner - Contributor III
Partner - Contributor III

Example

s_santalucia
Partner - Creator
Partner - Creator
Author

yes! Thanks

consultant_bi
Creator
Creator

Do you wanna store on a table the sum of sales by month on the last day and the first day of the next month ?