Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

fredericlehner
New Contributor II

Measure based on two date dimension

Hi.

I need your help.

I have two sources of data. Sales and Repairs and each has a distinct date (date sale, date repair).

I need to implement a chart with a MM.YYYY date dimension and a measure with the repair ratio divided by the sales (number repairs per month / number sales per month).

The data source is linked with the material number.

How to manage the dimension date on my KPI ?

Thanks for your suggestions,

Fred

Labels (4)
1 Solution

Accepted Solutions
Partner
Partner

Re: Measure based on two date dimension

Hi!

 

1) Create MonthYear field for both tables: Date(date sales,'MM.YYYY') as MY, Date(date repair,'MM.YYYY') as MY

2) Create calendar table.

Calendar:

NoConcatenate Load MY resident TabSales;

Load MY resident TabRepairs;

3) Drop MY fields from TabSales and TabRepairs

4) Create chart with MY dim and expression like: Count(repairs) / Count(sales)

 

Regards

2 Replies
Partner
Partner

Re: Measure based on two date dimension

Hi!

 

1) Create MonthYear field for both tables: Date(date sales,'MM.YYYY') as MY, Date(date repair,'MM.YYYY') as MY

2) Create calendar table.

Calendar:

NoConcatenate Load MY resident TabSales;

Load MY resident TabRepairs;

3) Drop MY fields from TabSales and TabRepairs

4) Create chart with MY dim and expression like: Count(repairs) / Count(sales)

 

Regards

fredericlehner
New Contributor II

Re: Measure based on two date dimension

Hi Zhandos,

I'ts very good and simple your solution ! Thanks !

Kind regards,

Fred