Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Display Multiple Datedimensions in on Diagramm

Hi everyone,

I've got a dataset where each row has 2 date dimensions (order date and consumption date). I'd like to display the sum on monthly basis for both dimensions in 1 diagram:

monthordersconsumptions
Jan 20103454
Feb 20104530
Mar 20103454

The original dataset is way too big to calculate it via an external calendar table and if-statements in the calculations. Does anyone deal with a similar problem and has got a solution for implementing such a date dimension with scripting?

Thanks!

Best regards,

Benedikt

1 Solution

Accepted Solutions

Re: Display Multiple Datedimensions in on Diagramm

Hallo Benedikt,

maybe this is what you are looking for:

QlikCommunity_Thread_109465_Pic4_.JPG.jpg

QlikCommunity_Thread_109465_Pic3_.JPG.jpg

I transformed your table a bit, using the crosstable prefix, in order to get one single date column.

By this you should keep the possibility to further analyse the data using your other dimensions.

QlikCommunity_Thread_109465_Pic2_.JPG.jpg

Here is the code:

tabData:

CrossTable (type, date, 2)

LOAD

  %JET_AUFTRAG,

  SumTickets,

  auftrag_datum as order,

  addmonths(vorst_datum,-12) as consumption

FROM

(biff, embedded labels);

Left Join

LOAD Distinct

  date,

  MonthName(date) as month

Resident tabData;

hope this helps

Gruß

Marco

3 Replies
Not applicable

Re: Display Multiple Datedimensions in on Diagramm

Hi Benedikt,

Please check out the attached and see if it helps. There wasn't enough data to get proper resuts but with a full data set it should be fine. You can test it out and see.

Thanks

AJ

Not applicable

Re: Display Multiple Datedimensions in on Diagramm

Hi Ajay,

thanks for the quick reply, it's cool to display it for a dashboard, but I'd like to keep the possibility to further analyse the data, which I loose if I pre-aggregate the data.

The whole dataset is arranged as star-topology and contains some master data about the orders and customers and so on, therefore, I'm looking for something similar to a if-statement but with better calculation times.

Thanks!

Benedikt

Re: Display Multiple Datedimensions in on Diagramm

Hallo Benedikt,

maybe this is what you are looking for:

QlikCommunity_Thread_109465_Pic4_.JPG.jpg

QlikCommunity_Thread_109465_Pic3_.JPG.jpg

I transformed your table a bit, using the crosstable prefix, in order to get one single date column.

By this you should keep the possibility to further analyse the data using your other dimensions.

QlikCommunity_Thread_109465_Pic2_.JPG.jpg

Here is the code:

tabData:

CrossTable (type, date, 2)

LOAD

  %JET_AUFTRAG,

  SumTickets,

  auftrag_datum as order,

  addmonths(vorst_datum,-12) as consumption

FROM

(biff, embedded labels);

Left Join

LOAD Distinct

  date,

  MonthName(date) as month

Resident tabData;

hope this helps

Gruß

Marco

Community Browser