Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
german_avanzato
Creator
Creator

Order with movement in the last X days

Hi Everyone
I am trying to achieve the following:
I need to list the number of order that hasn't movement in the past X days.
I solved this as you can see in the example (doing a set analysis).
But what I really want to do, is make the restriction in the dimension (with  a calculate one).

I dont want to do it with a set analysis, because I need to repeat the same set analysis in every column (in the real model are a lot more).

I dont know if a calculated dimension could be defined with a Concant or a aggr function.
If the in the dimension is used the "if" statement, the result is not the correct.

Any suggestion?
Thanks

1 Solution

Accepted Solutions
john9inno
Creator
Creator

try this.

=

if ( '$(NofDays)'>(Aggr(Max(MovementDay),Order)), Order,Null() )

View solution in original post

2 Replies
john9inno
Creator
Creator

try this.

=

if ( '$(NofDays)'>(Aggr(Max(MovementDay),Order)), Order,Null() )

german_avanzato
Creator
Creator
Author

In the example application works perfect, I will check in the real application with another condition (status of the order) and I will let you know if I need more help.

Very thanks