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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
zahidrahim_ocp
Partner - Creator
Partner - Creator

Simple Set Expression for two dates

Dear Qlik Experts,

I want to write a set expression based on two conditions but it is not working. I want to see sum for records which have APPLY_DATE_AT is less than or equal to selected date in a variable (filter date) and TRX_DATE is Greater than previous month and less than the date selected.

Sum(

{<APPLY_DATE_AT = {"$(='<=' & Date(Max(TRX_DATE)))"}>*<TRX_DATE = {"$(='>=' & Date(AddMonths(TRX_DATE,-1)+1))"}>*<TRX_DATE = {"$(='<=' & Date(TRX_DATE))"}>} AMOUNT_TAKEN

)


Regards,


Zahid Rahim

23 Replies
zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Dear Sunny,

PFA the same qvf with item_sid column.

If we select date 30-SEP-2017. Total is calculating perfectly as per your provided expression. Now if we open Item_sid filter we can see only Item_sid 1 is selectable and we can have total for item_sid =1 as well. (Reason Item_sid =1 have transaction on 30-SEP-2017)

But what about the other Item_sids 2 and 3 we cannot see totals for these two sids.

Regards,

Zahid Rahim

sunny_talwar

That's just how Qlik Sense and QlikView's association model works... based on your selection in one field, only those fields which have association with the other fields selection will be available for selection.... So, in you case only ITEM_SID = 1 is associated with 9/30/2017.... Don't recommend to break this association model, but if you really want, you can look into triggers.... the idea will be to select the last 30 days based on one selection you make in TRX_DATE field.... Unfortunately, I am new to Qlik Sense functionalities, so I won't be able to offer any help with the triggers, but if you want I can show you how this would work in QlikView

zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Dear Sunny,

Thank you for all these details. So we cannot apply a further filter. OK but it becomes very difficult to find a dimension like customer or product name from thousands of records in a table or chart. Is there any solution to simply find a specific value.

Regards,

Zahid Rahim

sunny_talwar

One way would be to create The As-Of Table and then make selection in the as of date and then it can work....