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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter Data in Table

Hello!

I have the following tables in my data model:

ENERGY:

   ACCOUNT_ID

   INSPECTION_FLAG

   TIMELINE

INSPECTIONS:

   ACCOUNT_ID

   INSPECTION_DATE

   INSPECTION_PERIOD

Here you have the table with data:

ACCOUNT_IDINSPECTION_DATE (DD/MM/YYYY)INSPECTION_PERIOD (YYYY/MM)TIMELINEINSPECTION_FLAG
00111/01/20112011061-
00111/01/20112011062-
00111/01/20112011063-
00111/01/20112011064-
00111/01/20112011065-
00111/01/201120110661
00111/01/20112011067-
00111/01/20112011068-
00111/01/20112011069-
00111/01/201120110610-
00215/05/20122012031-
00215/05/20122012032-
00308/07/20122012041-
00308/07/20122012042-
00412/09/20132013051-

What I need is to get those ACCOUNT_ID that have an INSPECTION_FLAG = 1.

And then show the ACCOUNT_IDs with all the corresponding information (INSPECTION_DATE, INSPECTION_PERIOD, TIMELINE).

For the example I gave, I should get the following:

ACCOUNT_IDINSPECTION_DATE (DD/MM/YYYY)INSPECTION_PERIOD (YYYY/MM)TIMELINE
00111/01/20112011061
00111/01/20112011062
00111/01/20112011063
00111/01/20112011064
00111/01/20112011065
00111/01/20112011066
00111/01/20112011067
00111/01/20112011068
00111/01/20112011069
00111/01/201120110610

Do you know how could I do that?

Thank you!!!

2 Replies
its_anandrjs
Champion III
Champion III

I Assume there is a relation between the two tables with ACCOUNT_ID

Then Take the straight table and

Calculated Dimension:- If( INSPECTION_FLAG = 1, ACCOUNT_ID )  //And click on suppress when value is null

Dimensions:-   INSPECTION_DATE,   INSPECTION_PERIOD,    TIMELINE

Expression:- 1

Not applicable
Author

Maybe the easiest way is to get a table ACCOUNT with primary key ACCOUNT_ID and a  flag telling you if the account has an inspection or not. (ACCOUNT_ID, INSPECTION_FLAG_ACCOUNT)

what is the timeline? is it a fact?