Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zahidrahim_ocp
Partner - Creator
Partner - Creator

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
its_anandrjs

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
Partner - Creator
Partner - Creator
Author

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