Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

zahidrahim_ocp
Contributor

Date Filter - Best Approach

Dear Experts,

If we have date fields in 2 tables then what is the way to handel it in a filter?

Suppose we have 2 tables

Sales

-----------------

Region_Id

Business_Id

Transaction_date

Sales Amount

Target

-----------------

Region_Id

Business_Id

Target_date

Target Amount

What is the best way to join above two tables that no synthetic key should created and how to handel the date filter that both tables should show data as per the date filter.

Best Regards,

Zahid Rahim

3 Replies
Not applicable

Re: Date Filter - Best Approach

Re: Date Filter - Best Approach

Why not concatenate this Sales And Target data in a single table with flag field over there. Or may be you go for Canonical dates explain by HIC.

Ex:- With concatenate

SalesAndTarget:

Load

Region_Id,

Business_Id,

Transaction_date,

'Sales' As TableFlag,

Sales Amount

From Source;

Concatenate(SalesAndTarget)

Load

Region_Id,

Business_Id,

Target_date,

'Target' As TableFlag,

Target Amount

From Source;

Canonical Date

zahidrahim_ocp
Contributor

Re: Date Filter - Best Approach

Dear Anand,

Thank you for the detail answer.

Please clarify two things:

Using concatenate option Do we need to show Sales and Target Amount in separate column using IF condition? and it will automatically display against correct date, region and business?

Secondly for using canonical date option please share syntax to create a separate Master Calendar from existing one QVD table?

I am sorry as i am very much new to Qlik.

Regards,

Zahid Rahim