Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
New Contributor

Add YTD, MTD, HTD, QTD, Q1, Q2, Q3, Q4 in master calendar using Fiscal Year

Hello Everyone,

I need your help to Add YTD, MTD, HTD, QTD, Q1, Q2, Q3, Q4 in master calendar using Fiscal Year.

The main reason in calculating it in Master Calendar is to use them as a Dimensions in UI. My fiscal year starts from 1st November.

I have read so many blogs but everywhere it is used as a Measure in UI.

Could someone help me in it?

Thanks in advance

Cheers

DC

1 Reply
Highlighted
Honored Contributor

Re: Add YTD, MTD, HTD, QTD, Q1, Q2, Q3, Q4 in master calendar using Fiscal Year

Use these:

InYearToDate()

InMonthToDate()

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...

'Q' & (ceil(WildMatch(month(Date),'Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar')/3)) as QTD

Table:

LOAD Year,

     Month,

     Sales,

     If(Peek('Year')=Year, RangeSum(Peek('SalesYTD'), Sales), Sales) as SalesYTD

Resident ABC

OrderBy Year, Month;

Check this:

https://community.qlik.com/blogs/qlikviewdesignblog/2014/03/03/ytd