Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

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
Highlighted
Partner
Partner

Re: Monthend and Monthstart- QS

Ex.

Highlighted
Partner
Partner

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 )

Highlighted
Partner
Partner

Re: Monthend and Monthstart- QS

Thanks!!!!! 

Highlighted
Partner
Partner

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

Highlighted
Partner
Partner

Re: Monthend and Monthstart- QS

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

Highlighted
Partner
Partner

Re: Monthend and Monthstart- QS

Example

Highlighted
Partner
Partner

Re: Monthend and Monthstart- QS

yes! Thanks

Highlighted
Creator
Creator

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 ?