Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Venu_K
Contributor II
Contributor II

Filtering the Week Ending Friday Dates (Dimension) Data

Hi Everyone,

I am being to try to achieve a qlik sense - Set expression as per the below conditions to have it at dimension:

1. 1st condition need to check the XYZ_DATE (Date field) is greater than max date of ABC date (date field having only Week ending Friday dates) data If XYZ_DATE is greater than max of ABC date data then we need the last 12 weeks date data of XYZ_DATE available ABC date data for example - If incase ABC date's data is last for 31-Dec-2021 and expression should give me recent 12 weeks date data with respect to 31-Dec-2021

2. If XYZ_DATE is less than max of ABC date data then we need the recent 12 weeks date data of ABC date data with respect to selected XYZ_DATE.

Below the expression we are trying:

({<ABC_DATE={">=$(=DATE(max({<ABC_DATE={"<=$(=max(XYZ _DATE))"}>}[ABC_DATE])-84))
<=$(=max({<ABC_DATE={"<=$(=max(XYZ_DATE))"}>}[ABC_DATE]))"
}
>}
[ABC_DATE])


The above is not working as expected can someone please help us on this at earliest time 

Thanks in advance -

Labels (7)
5 Replies
Chanty4u
MVP
MVP

The syntax of the expression looks correct, but you might need to adjust it based on the specific field names and date formats used in script 

Kushal_Chawda

@Venu_K  You need to provide more information like where you are using this expressions and what other dimensions are used if it is used in table.  Basically expected output with example

Venu_K
Contributor II
Contributor II
Author

Hi,

Thanks for the response.
Can you please provide us the same condition in if condition to have it in Qlik sense Dimension.

Chanty4u
MVP
MVP

May b this 

=IF(ABC_DATE >= Date(Max({<ABC_DATE={">=$(=Date(Max({<ABC_DATE={'<=$(=Max(XYZ_DATE))'}>}[ABC_DATE]))-84))<=$(=Max({<ABC_DATE={'<=$(=Max(XYZ_DATE))'}>}[ABC_DATE]))"}>} [ABC_DATE])), [ABC_DATE])

 

Venu_K
Contributor II
Contributor II
Author

No this is not working, and it's an invalid expression to have it in dimension.