Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
knkirubakaran
Contributor III
Contributor III

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

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.
knkirubakaran
Contributor III
Contributor III
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.