Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
VaishnaviMogal2
Contributor III
Contributor III

filter data table based on selection in another data table

Hi,

I have two table each with different data files. so the selection in one tables doesn't effect another table data. 

I want to filter the data based on selection made in date field of another data.

I'm trying to solve using below exp but not getting result.

if(date(DateTime)=({$}[Start Datetime]),DateTime) 

here DateTime is a date field in one table(raw dataset) and Start Datetime is a date field in another table(summary dataset).

How can I achieve this?. any suggestion would be helpful.

Thank you.

Labels (5)
3 Replies
Chanty4u
MVP
MVP

Try this 

Sum({<DateTime={"$(=Only([Start Datetime]))"}>} Sales)

 

VaishnaviMogal2
Contributor III
Contributor III
Author

Hi @Chanty4u ,

I am trying using this (as all fields are dimensions, can't use any aggregation funct)

=if(date(DateTime)={"$(=Only([Start Datetime]))"},DateTime)

but this giving me error in expression msg. not getting what is wring in this expr.

Thanks.

gomeri
Partner - Contributor III
Partner - Contributor III

Hi, 

Having two tables, in the first I enter the data I want to filter, in the second I enter the data I want to display based on the selections made in the first table.

In this way, I create a column with the set expression in the second table that filters the data according to the selections made in a column of the first table.

My set expression contains two functions, a 'GetFieldSelections' to count the selected fields and a 'Replace' that replaces ',' with the comma and space (', ')

(The set expression is contained in the third column of the second table).

=SUM({<[DateTime]={"$(= Replace(GetFieldSelections([Start Datetime]), ', ', '","') )"}>}DateTime)

 

gomeri_0-1718620424451.png

gomeri_1-1718620497154.png

 

let me know if it works

Thanks

 

Giovanni O. D.