Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

siva_boggarapu
Contributor II

How to show Date range as a subtitle or footer?

Hi,

I have date filed. If I select one value from date filed. It has to show date range(based on Selection)  last 4 weeks and also I want to display date range in Subtitle or footer in in Filter pane

Ex: For example If I select 1/7/2017. It has to date range from 10/6/2017 to 1/7/2017(Last 4 weeks)


Thanks,

Siva

1 Solution

Accepted Solutions
juraj_misina
Valued Contributor

Re: How to show Date range as a subtitle or footer?

So instead of subtracting one month subtract 28 days?

'Date range from '& date(max(Date(WeekEndingCY))-28)& ' to '&Date(max(Date(WeekEndingCY)))

6 Replies
omarbensalem
Esteemed Contributor

Re: How to show Date range as a subtitle or footer?

='Date range from '& date(addMonths(max(Date),-1))& ' to '&Date(max(Date))

Re: How to show Date range as a subtitle or footer?

Maybe try an expression for the Subtitle something like :

= Date ( Min ( [YourDate] ) ) & ' to '  & Date ( Max ( [YourDate] ) )

siva_boggarapu
Contributor II

Re: How to show Date range as a subtitle or footer?

Hi Omar,

Thanks for reply. when I am adding the expression like below

'Date range from '& date(addMonths(max(Date(WeekEndingCY)),-1))& ' to '&Date(max(Date(WeekEndingCY)))

Ex: I select date 1/7/2017. So, date range last 4 weeks based on selection.

It has to show 1/7/2017 to 3/6/2017(Last 4 weeks)

Thanks,

Siva

Highlighted
omarbensalem
Esteemed Contributor

Re: How to show Date range as a subtitle or footer?

What is it returning?

u can alter it as follow:

='Date range from '& Date(max(Date))& ' to '& Date(max(Date)-28)

siva_boggarapu
Contributor II

Re: How to show Date range as a subtitle or footer?

It is returning date range from 12/7/2016 to 1/7/2017 when I select date 1/7/2017

But I want If I select date 1/7/2017. date range should show 3/6/2017 to 1/7/2017(last 4 weeks)

Thanks,

Siva

juraj_misina
Valued Contributor

Re: How to show Date range as a subtitle or footer?

So instead of subtracting one month subtract 28 days?

'Date range from '& date(max(Date(WeekEndingCY))-28)& ' to '&Date(max(Date(WeekEndingCY)))