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: 
mshailaja
Contributor III
Contributor III

need help

Hi

i have a chart like below

i have taken 2 dimensions with one expression

the user wants only last 3 months data. suppose  this month is march , user wants data from january

if the current month is april 2017 , user wants the data form feb 2017 to april 2017

i have given 2 dimensions as  and expression as below

  can ayone please help

14 Replies
avinashelite

As per the screen shot your getting the results what you want na ...if you want the selection on the calendar object add the Month Year to calendar Object ...

OR

if you have a Master Calendar then link month year filed with the calendar filed

Hope you got the answer 

mshailaja
Contributor III
Contributor III
Author

Hi

You didnt undersatnd wat i said

if i click on month on the claneder i have to show previous 3 months data , but for me if i am not selecting month,it is showing last 3 months data.

if i select April i have to show 3 months data like feb,march ,april data like that, please help me

avinashelite

Hmmm

try like this

if(Getselectedcount(MonthYear )>0,Count(DISTINCT{<MonthYear ,MonthYear ={">=$(=Date(addmonths(Max(MonthYear), -2), 'MMM-YY')) <=$(=Date(addmonths(Max(MonthYear), 0), 'MMM-YY'))"} >} NUM),Count(DISTINCT{<MonthYear ,MonthYear ={">=$(=Date(addmonths(Max(MonthYear), -2), 'MMM-YY')) <=$(=Date(addmonths(Max(MonthYear), 0), 'MMM-YY'))"} >} NUM))



OR

Count(DISTINCT{<MonthYear ,MonthYear ={">=$(=Date(addmonths(Max(MonthYear), -2), 'MMM-YY')) <=$(=Date(addmonths(Max(MonthYear), 0), 'MMM-YY'))"} >} NUM)


mshailaja
Contributor III
Contributor III
Author

not coming , i tried  with  both expressions

showing like that

avinashelite

why  don't you share the app...???