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: 
rperezlaso
Contributor III
Contributor III

Filtering panel dates in one table graphic ?

hello friends,

i have a problem. I need to filtering panel by date (day/month).

add the table graphic with all fields:

id / time_table1 / desc_table1 / time_table2 / desc_table2

and need to add filtering panel by day and month. how can I solve that ?

thanks.

TABLES EXPAPLE:

STEP1_TABLE:

id :

1,2,3

time_table1:

1/3/2018 12:22:22, 2/3/2018 12:23:22, 2/3/2018 12:24:22

desc_table1:

abc, bca, cba


STEP2_TABLE:

id :

1,2,3

time_table2:

1/3/2018 12:27:22, 2/3/2018 12:28:22, 2/3/2018 12:29:22

desc_table2:

zzz, bbb, ggg

1 Solution

Accepted Solutions
MK9885
Master II
Master II

pfa

Edit*****

I forgot to add at the end of the script after Drop Table  TempCalendar;

Drop Table  QuarterNAME;

View solution in original post

25 Replies
MarioCenteno
Creator III
Creator III

Try

Day(Date)

Month(Date)

rperezlaso
Contributor III
Contributor III
Author

dont work for my.

day(date)

month(date)

the problem is :

when I select time1 it does not filter by time 2 and when filter by time 2 it does not filter by time 1.

I need a global time filter.



day(time1)

day(time2)

month(time1)

month(time2)

jonathandienst
Partner - Champion III
Partner - Champion III

Because time1 and time2 are only indirectly associated by id, selecting one will not necessarily filter the other one. So your data model is not well suited to addressing your problem.

Perhaps if you could explain in more detail what your would like to achieve and upload some sample data and the required output, you might get more specific help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
ChennaiahNallani
Creator III
Creator III

try like below

STEP1_TABLE:

LOAD

    //id,

    //time_table1,

    id&'-'&time_table1 as %key1,

    desc_table1

FROM [lib://c/Results.xlsx]

(ooxml, embedded labels, table is Sheet2);

STEP2_TABLE:

LOAD

    //id,

   // time_table2,

    id&'-'&time_table2 as %key2,

    desc_table2

FROM [lib://c/Results.xlsx]

(ooxml, embedded labels, table is Sheet3);

Link_Table:

Load

    id,

    time_table1 as Date,

    id&'-'&Null() as %key2,

    id&'-'&time_table1 as %key1

FROM [lib://c/Results.xlsx]

(ooxml, embedded labels, table is Sheet2);

Load

    id,

    time_table2 as Date,

    id&'-'&Null() as %key1,

    id&'-'&time_table2 as %key2

FROM [lib://c/Results.xlsx]

(ooxml, embedded labels, table is Sheet3);

filter :

day(Date)

month(Date)

jonathandienst
Partner - Champion III
Partner - Champion III

Alternatively, you may be able to get the effect you want by using slightly more complex expressions using set analysis with the P operator. Something like this clause in the set expressions:

     time1 = P(time2)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
rperezlaso
Contributor III
Contributor III
Author

i have this:

temp1.png

and i need this:

temp1.png

MarioCenteno
Creator III
Creator III

Give a generic alias to the date fields

Try

For example

[table_1]:

load

time1 as time

select * from table_1;

[table_2:

load

time2 as time

select * from table_2;

MarioCenteno
Creator III
Creator III

Use the calendar Master.

Try

For example

[table_1]:

load

time1,

time1 as time

select * from table_1;

[table_2:

load

time2,

time2 as time

select * from table_2;

CalendarMaster:

LOAD

    Date(time) AS InvoiceDate,

    Year(time) AS Year,

    'Q' & Ceil(Month(time) / 3) AS Quarter,   

    Month(time) As Month,

    Day(time) As Day,

    Week(time) As Week;

Load Date(MinDate + IterNo() -1 ) AS InvoiceDate While (MinDate + IterNo() - 1) <= Num(MaxDate);

Load

    Min(time) AS MinDate,

    Max(time) AS MaxDate

RESIDENT Invoice;

rperezlaso
Contributor III
Contributor III
Author

sorry my fields :

table1:

id - primary key

time as time1

desc as desc2

table2:

id-primary key

time as time2

desc as desc2

if i change time1 and time2 to ( time ) qlikSense create a synthetic relation.

thx