Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

last 10 days in Dim

hi  all,

I want to restrict the data in dimension level for last 10 days only.

Dim:   OpenDate         Format [MM/DD/YYYY]

Exp: =Avg({$<Type={'Phone'},OpenDate={">=$(=date(max(OpenDate)-10))<=$(=max(OpenDate))"}>} ID)

I wrote this but its not working as expected.  Am using bar chart .

3 Replies
svinnakota
Creator
Creator

Hi,

Avg({$<Type={'Phone'},OpenDate={">=$(=date(max(OpenDate)-10))<=$(=max(OpenDate))"}>} ID): I assume you are using this expression in the measure.


If you want to restrict the dimension part then try using the below expression:


if(opendate>= date(now())-10, opendate, null())


Uncheck the null box in the dimension so that u ll get only the last 10 days data.


let us know if this solutions works for you or not


Santosh

soniasweety
Master
Master
Author

Not working

only showing 6 days with Number format

svinnakota
Creator
Creator

if(opendate>= date(now())-10, date(opendate,'DD-MM-YYYY', null())


use the above expression and what is first date and what is the last date u have in your dataset.


Please post an sample data and the app if possible


Santosh