Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create ytd or mtd on my data I have just the month field name in my data so I want to show data as when I select March in the month then it also sums the previous month's data values. Like January value is 100 Feb value is 150 and the March value is 50 when I select March from mtd then it shows a sum of 300 if I select Feb from the month then it shows 250.
Sample Data Attached in picture
Thanks in Advance
Try this
YTD
Sum({<MonthField={"<=$(=Max(MonthField))"}>} ValueField)
MTD
Sum({<MonthField={">=$(=MonthStart(Max(MonthField)))"}, MonthField={"<=$(=Max(MonthField))"}>} ValueField)
how can i create master calendar on the base of month field
Hi,
Here we have script to create master calendar basically you need to find min date & max date & generate set of dates for between perid.
https://community.qlik.com/t5/Member-Articles/SIMPLE-MASTER-CALENDER/ta-p/1484974
Vikas
This is a simple calendar you can create.
Calendar:
Load
Min(LAST_UPDATED_DATE) as MinDate,
Max(LAST_UPDATED_DATE) as MaxDate
FROM source
Let vMinDate = Date(Floor(Peek('MinDate')),'YYYY-MM-DD');
Let vMaxDate = Date(Floor(Peek('MaxDate')),'YYYY-MM-DD');
Let vStartDate = Date(AddMonths(MonthStart(Date(Floor(Peek('MaxDate')),'YYYY-MM-DD')),-12),'YYYY-MM-DD');
Let vEndDate = Date(Floor(Peek('MaxDate')),'YYYY-MM-DD');
Drop Table Calendar;