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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

TY vs LY Triggers, alternate states and copy state contents

Was wondering if you had any idea on this problem.

I have Ty v LY Revenue, the TY and LY figures needs to have a certain formula added to it to give "advance bookings".

This equation says take all of the departures from the start of the week with sales from today and before. For LY it takes this date range and figures out what this is in the Last year.

I am using triggers in a button to do this, see "Apply changes" button.

Now this all works fine until I have selected some selections that generate revenue for the TY figure but there is no revenue for LY for these selections. When I hit the button "Apply changes" the Copy state contents trigger doesn't pass over all the selections. then because of this the LY figure is massively out compared to the TY figure.

I have added an example on the QVW that i sent you, where I chose DepartureName "Megkzfo-kjwb-Shhpg"  in TY selection but when i hit the "apply changes" button it doesn't copy over selections as this wasn't available last year so therefor gives huge number of 38,677.

Is there a way of getting around this with set analysis?

Labels (1)
2 Replies
sunny_talwar

What would be the expected number for LY for these particular selections?

sunny_talwar

May be try this for LYREV

Sum({<TransactionDate = {"$(='>=' & Date(AddYears(Min(TransactionDate), -1)) & '<=' & Date(AddYears(Max(TransactionDate), -1)))"}>} LegFare)