Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Min 3 dates values

hi All,

I wanted to take data whose expire date is greater than today().

I use from following code

One:
LOAD [Campaign Id],
[Batch Id],
[Start Date],
[Exp Date]
FROM

(
ooxml, embedded labels, table is Sheet1) Where [Exp Date]>Today();

but now I want to show data of  3 expire date of today in pivot or metric. Could anyone explain me how to do it?

do we have any good process than what I did here?

Thanks in adv.

1 Solution

Accepted Solutions
sunny_talwar

May be like this

Dimension

Batch Id

Campaign Id

Exp Date

Expression

Date(Only({<[Start Date] = {"$(='<=' & Date(Min([Start Date], 3), 'DD/MM/YYYY'))"}>} [Start Date]))

Updated the expression and attached a sample

View solution in original post

8 Replies
Anil_Babu_Samineni

You can use those Dates as Static in pivot expression

Sum({<[Exp Date = {'Date1','Date2','Date3'}]>}Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

now I want to show data of  3 expire date of today in pivot or metric.

3 expire date of today? What do you mean? Do you mean the campaign id which is within 3 days from today?

adamdavi3s
Master
Master

Do you mean this?


count({<[Exp Date] = {"<=$(=date(today()-3))"}>}Campaign Id)

sunny_talwar

Adam I think there is a typo in your and Anil's expression

Sum({<[Exp Date = {"<=$(=date(today()-3))"}]>}Sales)

Should be this

Sum({<[Exp Date] = {"<=$(=date(today()-3))"}>}Sales)

adamdavi3s
Master
Master

sorry typing too quick, corrected it

Not applicable
Author

I have data after reload

 

Batch IdCampaign IdStart DateExp Date
21281717114/03/202314/02/2024
21789634317/08/202017/07/2021
22684569730/09/201930/08/2020
23984844205/12/202305/11/2024
24187497814/04/202214/03/2023

I want answer

 

Batch IdCampaign IdStart DateExp Date
22684569730/09/201930/08/2020
21789634317/08/202017/07/2021
24187497814/04/202214/03/2023
sunny_talwar

May be like this

Dimension

Batch Id

Campaign Id

Exp Date

Expression

Date(Only({<[Start Date] = {"$(='<=' & Date(Min([Start Date], 3), 'DD/MM/YYYY'))"}>} [Start Date]))

Updated the expression and attached a sample

Not applicable
Author

Thanks all of you ...