Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
KommulaRahul
Contributor III
Contributor III

I have one field in my pivot table. That field name is Date. I need to get the dates from Starting month like Jun 1(01/06/2023) to the present date.

What expression do i need to use for this one. 

Labels (1)
4 Replies
sidhiq91
Specialist II
Specialist II

@KommulaRahul  Could you please try something like below in your script:

NoConcatenate
Load
Date( MonthStart+IterNo()-1) as Date
while MonthStart+IterNo()-1 < PresentDay;

Load
Monthstart(Date) as MonthStart,
Date as PresentDay;
Load
Today() as Date
Autogenerate 1;


Exit Script;

If this resolves your issue, please like and accept it as a solution.

KommulaRahul
Contributor III
Contributor III
Author

Not working

Any other alternative

Is there any expression which we can add at the front end related to this one. 

MartW
Partner - Specialist
Partner - Specialist

@KommulaRahul This is something best handled by a back-end script.

Why?

because this can be very intense if Qlik needs to calculate this on the fly. 

for let's say last week to today, for front and back-end no problem but if last week is 1-1-2010. then I can become a problem for Qlik's front-end to do those calculations.

because it is going to do them probably every time you make a selection on your front-end sheet

KommulaRahul
Contributor III
Contributor III
Author

Can we go by MTD