Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

fetching rows based on startdate

Hi all,

i have campaignmetrics table, where it as campaign_start_date, here i have to get rows, where campaign_start_date contains date of previous month dates.


How could i get these rows. Please help me on this any help is appreciated.



Regards

Tags (2)
3 Replies
vinieme12
Esteemed Contributor II

Re: fetching rows based on startdate

have you tried this logic in where clause of your table load?

Month(campaign_start_date) <MONTH(TODAY())

MVP
MVP

Re: fetching rows based on startdate

for previous month

you can check the month start of campaign_start_date is the same as monthstart of 1 month ago

.........

where

     MonthStart(AddMonths(today(), -1)) = MonthStart(campaign_start_date)

berryandcherry6
Contributor II

Re: fetching rows based on startdate

Hi,

Thanks for reply

here campaign starts( campaign_start_date ) every thuesday and end in sunday of each week.

so my previous month will be in  27-06-2016 to 31-07-2016

my current month will be 01-08-2016 to 28-08-2016.


so i wont be able to use MonthStart(AddMonths(today(), -1)) = MonthStart(campaign_start_date).

Community Browser