Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Joo525
Contributor II
Contributor II

Two dates from same table

Hi,

I am creating a Qlik Sense App which includes several tables. The SQL part is working good (I am using the editor), the joins don't give double rows.

Now my problem:

Our database consists of articles. Each article has several starting dates (and therefore end dates) for pricing.

2.JPG

My need is to create a Qlik table which shows the article with its todays price and the period that price is valid in. That is not that hard, using the fuction getdate().

Now I want to show the previous pricing conditions in the next rows. In my database I have one row for starting date and one row for end date.

1.JPG

I hope I could explaine what I need.

Thank you for your help.

 

1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

Depending on your data model maybe try Max & FirstSortedValue that can both take a parameter to give the nth value, so something like;

20210923_1.png

Cheers,

Chris.

View solution in original post

3 Replies
chrismarlow
Specialist II
Specialist II

Hi,

Depending on your data model maybe try Max & FirstSortedValue that can both take a parameter to give the nth value, so something like;

20210923_1.png

Cheers,

Chris.

Joo525
Contributor II
Contributor II
Author

Thank you, it works out perfectly.

Joo525
Contributor II
Contributor II
Author

Now, as I am getting further with my app, there has poped up another question:

The date and the price filds are measures now. But how can I filter by measures?

Thank you again!