Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil1989
Contributor
Contributor

issue while comparing date analysis

Hi ,

Thanks in advance.

i am new to qlik ,

i am having straight table in that i have to calculate the result on the basis of delivery date and payment date.

if payment date is greater than delivery date than it should give sum(final amount) my expression is below

=Sum({<paymentCompletionDateTime={">$(=actualDeliveryDateTime)"}>}finalTotalAmount)

its giving me result  when i am selecting the true date in table  , otherwise its showing me 0.

2 Replies
PrashantSangle

Hi,

If both field coming from same table then

create flag in script  like

if(payment_date>delivery_date,'T','F') as flag,

then in front end use expression like

sum({<flag={"T"}>}finalTotalAmount)

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Try like:

=Sum({<paymentCompletionDateTime={"=paymentCompletionDateTime>actualDeliveryDateTime"}>}finalTotalAmount)