Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Masterkalender

ENGLISH VERSION BELOW

Hallo zusammen,

ich habe eine Frage bezüglich des Masterkalenders.

Undzwar habe ich folgende Wahlmöglichkeiten bezüglich der Zeit geschaffen:

Unbenannt.PNG

Wähle ich jetzt beispielsweise KW1 (Kalenderwoche 1) aus, summiert er automatisch in allen meinen Diagrammen die KW1 aus den Jahren 2014, 2015 und 2016.

Das selbe gilt für Das Datum, den Monat etc.

Meine Frage: Um bei meinem Beispiel mit der Kalenderwoche zu bleiben - Wie kann ich das Skript abändern, sodass bei Auswahl von KW1 nicht 1 Balken entsteht (Summe aus Werte 2014+2015+2016), sondern 3 (2014, 2015 und 2016 jeweils nebeneinander)?

Hello,

I have a question regarding the calendar.

I created the one above. So i am able to choose between year, month, calendarweek,...

If i choose for example KW1 (calendarweek 1), Qlikview automaticaly sums up the numbers of the calendarweeks from 2014,15,16.

The same when i choose a month. In a diagramm he would create a single bar in which he sums up the KW, month or whatever of all the 3 years.

My Question: Is it possible that Qlik creates 3 single bars (for each year one) when i choose e.g. 'January'

So i only filter January and he shows 3 single bars.

Hope u guys understand what i mean.

Thanks and kind regards.

4 Replies
Gysbert_Wassenaar

My Question: Is it possible that Qlik creates 3 single bars (for each year one) when i choose e.g. 'January'

So i only filter January and he shows 3 single bars.

Sure, just add the Year field as dimension to your chart.


talk is cheap, supply exceeds demand
MarcoWedel

Hallo Jan,

another solution could be to create a WeekYear field that includes the year part as additional field and use it as dimension:

WeekName(DateField) as WeekName

to format the field as 'KWxx/YYYY' you can do something like

Dual('KW'&Week(DateField)&'/'&WeekYear(DateField),WeekName(DateField)) as WeekName2

QlikCommunity_Thread_210415_Pic1.JPG

QlikCommunity_Thread_210415_Pic2.JPG

table1:

LOAD *,

     Year(DateField) as Year,

     Month(DateField) as Month,

     Week(DateField) as Week,

     WeekName(DateField) as WeekName,

     Dual('KW'&Week(DateField)&'/'&WeekYear(DateField),WeekName(DateField)) as WeekName2,

     Ceil(Rand()*100) as Value;

LOAD Date(MakeDate(2010)+IterNo()-1) as DateField

AutoGenerate 1

While MakeDate(2010)+IterNo()-1 <= Today();

hope this helps

regards

Marco

Not applicable
Author

Thanks Marco.

I am new to Qlikview and now i have to adapt a pretty complex Qlikview App.

Your idea works but i am not able to implement it into the existing code.

This is probably the important part of the mastercalendar code i need to adapt:

Kalender:
LOAD
Num(DateID) AS %Key_Datum,
// Num(DateID + MinuteID) AS %Key_Minute,
// Text(Timestamp(Num(DateID + MinuteID), 'YYYY|MM|DD|hh|mm')) AS %TIME_KEY,
Date(DateID) AS Datum,
'KW ' & Week(DateID) AS Woche,
Day(DateID) AS Tag,
Month(DateID) AS Monat,
Year(DateID) AS Jahr,
Weekday(DateID) AS Wochentag

// if(MinuteID         > (22/24), Dual('Nacht', 0),
     // if(MinuteID     > (14/24), Dual('Spät', 2),
         // if(MinuteID > ( 6/24), Dual('Früh', 1),
            // Dual('Nacht', 0)))) AS Schicht
RESIDENT
DateSrc;

Are you able to implement your code into this one?

MarcoWedel

Hallo Jan,

it could be something like

Dual('KW'&Week(DateID)&'/'&WeekYear(DateID),WeekName(DateID)) as WocheJahr


depending on your source data.

Can you post a sample of your source table to test a solution with?


Danke


Gruß


Marco