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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Rehan
Creator III
Creator III

Selected Dates Issue

I have a data set with ETL Date and Amount.  Requirement is that  when the user selects 2 different ETL Dates,  it should give me the below:

-Sum(ETL Date 1) - Sum( Etl Date 2)

-Sum(ETL Date 1)

/

Sum(ETL Date 2)

I used  the below expression to  get the difference between 2 selected dates but it works only for a straight table  with ETL Date as a Dimension.  I need expression which can give me the above 2 requirements even in a KPI  or Text Object.

Attached please find the sample app with the sample data

Rangesum(
Sum(Amount),
-Above(Sum(Amount))* Avg(1))

2 Replies
ashishkalia
Partner - Creator
Partner - Creator

Hi @Rehan ,

Got a bit confused regarding what you are trying to achieve. 

But if in the attachment, the scenario is:

>Select 2 dates
>Get the difference of both the days sales then,

Use this formula: 

=Sum({<[ETL Date] = {"$(=Max([ETL Date]))"}>}Amount)
-
Sum({<[ETL Date] = {"$(=Min([ETL Date]))"}>}Amount)

 

Attached the qvw for reference. let me know if there is some different expectation.

 

cheers!!!

AK

Rehan
Creator III
Creator III
Author

I need the max and MIn date from the 2 selected dates not from the entire data set