Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last 12 months in dimension

Instead of hardcoding, is it possible to set last 12 months for dimension.

If condition

=If(CREATED_DATE>=Date#('10/01/2016','MM/DD/YYYY'),MonthName(CREATED_DATE))

or

set Analysis for last 12 months

Dimension: CREATED_DATE

Measure: (Count(DISTINCT {<_Source={'A'}>}[ID1]) + Count(DISTINCT {<_Source={'B'}>} ID2))

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

may be this

=If(CREATED_DATE>=Date(monthstart(addmonths(today(),-12)),'MM/DD/YYYY'),MonthName(CREATED_DATE))


edit: left s in add months . corrected it


regards

Pradosh

Learning never stops.

View solution in original post

4 Replies
Anil_Babu_Samineni

What date this is ? 10/01/2016

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
pradosh_thakur
Master II
Master II

may be this

=If(CREATED_DATE>=Date(monthstart(today()),'MM/DD/YYYY'),MonthName(CREATED_DATE))

Learning never stops.
Anonymous
Not applicable
Author

need to set last one year in dimension(10/01/2016) MM/DD/YYYY,

pradosh_thakur
Master II
Master II

may be this

=If(CREATED_DATE>=Date(monthstart(addmonths(today(),-12)),'MM/DD/YYYY'),MonthName(CREATED_DATE))


edit: left s in add months . corrected it


regards

Pradosh

Learning never stops.