Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
morenoju
Partner - Specialist
Partner - Specialist

Set analysis greater than p()

Hi guys,

I need to change this expression so I get all link_date_time_15min values greater than the current possible value for start_timestamp.

This is the expression I have (works, but it's not what I need, since it only returns one value):

=aggr(ONLY({<[link_date_time_15min]=p(start_timestamp)>}[link_date_time_15min]),[link_date_time_15min])

I tried to replace =p(start_timestamp) by >p(start_timestamp) with no luck.

Is it a problem of syntaxis? Can you recommend anything?

Thanks

Labels (4)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You can check out my attached app.

I've added two calculated dimensions with slightly differnent behaviour. Try them out and see if one of them fits your need.

image.png

-Vegar

View solution in original post

11 Replies
Vegar
MVP
MVP

Try the expression below

 

=aggr(ONLY({<

   [link_date_time_15min]= {">=$(=only(=start_timestamp))"}

   >}[link_date_time_15min])

,[link_date_time_15min])

morenoju
Partner - Specialist
Partner - Specialist
Author

Hi Vegar,

Thanks for the expression. Unfortunately, I keep getting all dates as result. I've tried the expression in a filter pane, putting right next to it the value of start_timestamp in a text box.

Do you have any idea on why I may keep seeing link_date_time_15min which are earlier than start_timestamp?

Thanks

image.png

neelamsaroha157
Specialist II
Specialist II

Do you mind sharing some sample data.

morenoju
Partner - Specialist
Partner - Specialist
Author

Sure thing! Sample app here

Here's a sample application. On the left there is a list where the user can click on any row.

Once a row has been selected, the start_timestamp is displayed on a text box (that works). However, I would need that the filter pane offered only link_date_time_15min values with timestamp > start timestamp.

What I'm trying to find is a proper expression for that filter pane.

Thanks much!

Vegar
MVP
MVP

I think you provided the wrong example app. 

"Andel av tjänsteutveckling" does not contain the fields you are reffering to, link_date_time_15min values with timestamp and start timestamp.

 

[Testdata]:
LOAD * INLINE 
[
NumYearMonth,ServiceName,#NoOfSubscriptions
jan.-19,Telefoni,10
jan.-19,Bredband,5
jan.-19,Internet,3
feb.-19,Telefoni,10
feb.-19,Bredband,5
feb.-19,Internet,3
mars-19,Telefoni,45
mars-19,Bredband,9
mars-19,Internet,−4
](delimiter is ',');
morenoju
Partner - Specialist
Partner - Specialist
Author

Hi Vegar,

Do you mind to check the link? It should be link_date_time_15min.qvf

https://drive.google.com/file/d/1cOVztklSOTfHdq4QRpSexcDTtUpcXyjm/view?usp=sharing

Thanks much!

Juan

Vegar
MVP
MVP

You can check out my attached app.

I've added two calculated dimensions with slightly differnent behaviour. Try them out and see if one of them fits your need.

image.png

-Vegar

morenoju
Partner - Specialist
Partner - Specialist
Author

Thank you so much, Vegar! I'll try it out and let you know!

morenoju
Partner - Specialist
Partner - Specialist
Author

Vegar, you nailed it!

I'm using one of your expressions:

=if('$(=start_timestamp)'<link_date_time_15min, timestamp(link_date_time_15min))

Thanks again!