Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jjustingkm
Creator
Creator

filter should be applied to two fields in the same table

I have multiple fact tables sharing common dimension tables.  The issue I am facing is one of the fact tables has 2 date fields DT1, DT1 as shown below . They should be filtered based on the selection on a single filter DT . That mean if select 1/1/2001 only the first row get selected , if 1/2/2001 no records will be selected.

 

Any help would be appreciated.

 

ABDT1DT2Amount
aa1bb11/1/20011/1/202110
aa2bb11/1/20011/2/202110
aa2bb11/3/20011/12/202110
2 Replies
gkhetan
Contributor II
Contributor II

Hi Jjustingkm

Please try using below expression for both the date columns

=if(GetFieldSelections([DT])=[DT1],[DT1])

and uncheck "Include null values" option for both columns.

Thanks,

GKhetan

jjustingkm
Creator
Creator
Author

Not sure i fully understood your solution. The date look up table looks like below . The user can select year and then the linking should happen on DT column. The difficultly I have is that i have to join to both fields in the transaction table.

DT                            YEAR

2/2/2002               2002

2/3/2002               2002