Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rperezlaso
New 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
Khan_Mohammed
Honored Contributor II

Re: Filtering panel dates in one table graphic ?

pfa

Edit*****

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

Drop Table  QuarterNAME;

25 Replies
guitartrova
Contributor III

Re: Filtering panel dates in one table graphic ?

Try

Day(Date)

Month(Date)

rperezlaso
New Contributor III

Re: Filtering panel dates in one table graphic ?

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)

MVP
MVP

Re: Filtering panel dates in one table graphic ?

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.

ChennaiahNallani
Contributor III

Re: Filtering panel dates in one table graphic ?

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)

MVP
MVP

Re: Filtering panel dates in one table graphic ?

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)

rperezlaso
New Contributor III

Re: Filtering panel dates in one table graphic ?

i have this:

temp1.png

and i need this:

temp1.png

guitartrova
Contributor III

Re: Filtering panel dates in one table graphic ?

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;

guitartrova
Contributor III

Re: Filtering panel dates in one table graphic ?

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
New Contributor III

Re: Filtering panel dates in one table graphic ?

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

Community Browser