Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

s_santalucia
Contributor

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
Contributor

Re: Monthend and Monthstart- QS

Ex.

francescoreggia
New Contributor III

Re: Monthend and Monthstart- QS

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
Contributor

Re: Monthend and Monthstart- QS

Thanks!!!!! 

s_santalucia
Contributor

Re: Monthend and Monthstart- QS

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
New Contributor III

Re: Monthend and Monthstart- QS

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

francescoreggia
New Contributor III

Re: Monthend and Monthstart- QS

Example

s_santalucia
Contributor

Re: Monthend and Monthstart- QS

yes! Thanks

consultant_bi
Contributor

Re: Monthend and Monthstart- QS

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 ?