Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I am new to programming/qlik and find it quite complicated...
Task is to create a dashboard which contains information about:
- Number of Matricule numbers that are in the Month - Year in Guarantee.
- Number of Matricule that just entered into guarante in that Month Year.
- Number of Matricule numbers that are leaving the guarantee in the upcoming month.
The goal is to create a Column Bar graphic but honestly I do know how... being stucked for two weeks.
Timelapse is Dic-2012, Jan-2013,Feb-2013..... Dic-2032
** Every matricule number has a Beginn and End of Guarantee date.
Creating a dashboard with the given requirements in QlikView/Qlik Sense involves several steps. Since you mentioned you're new to programming and Qlik, I'll try to provide a simplified step-by-step guide. Keep in mind that the exact steps might vary depending on the version of Qlik you're using, but the general approach should remain similar.
Data Preparation: Make sure you have your data in a suitable format, likely a table with columns for Matricule Number, Begin Date, and End Date. Ensure the dates are in a format Qlik can understand (usually YYYY-MM-DD).
Data Loading: Open your Qlik application and load the data using the script editor. This involves writing Qlik's script language (QlikView or Qlik Sense script) to load and structure your data.
Date Dimensions: Create a master calendar with all relevant date values between December 2012 and December 2032. This will help you establish the time periods for your analysis.
Set Analysis Expressions: You'll need to write expressions that calculate the counts based on the defined time periods. Qlik uses Set Analysis to filter data for specific dimensions.
Create Visualizations: For the column bar graphic, you will create a bar chart visualization.
Here's a simplified example of how you might achieve this in Qlik Sense:
Assumptions:
Expressions:
1. Number of Matricule numbers in the Month-Year in Guarantee:
Count({<BeginDate={"<=$(=Date(EndOfMonth(Max(MonthYear))))"}, EndDate={">=$(=Date(StartOfMonth(Min(MonthYear))))"}>} DISTINCT MatriculeNumber)
2. Number of Matricule that just entered into guarantee in that Month-Year:
Count({<BeginDate={">$(=Date(StartOfMonth(Min(MonthYear))))"}, EndDate={">=$(=Date(StartOfMonth(Max(MonthYear))))"}>} DISTINCT MatriculeNumber)
3. Number of Matricule numbers that are leaving the guarantee in the upcoming month-year:
Count({<BeginDate={"<=$(=Date(EndOfMonth(Max(MonthYear))))"}, EndDate={">$(=Date(EndOfMonth(Max(MonthYear), -1)))"}>} DISTINCT MatriculeNumber)
Remember to adjust these expressions according to your actual field names, table names, and calendar setup.
Bar Chart Visualization:
Thanks for the answer but still not working.
For the point number 1.
Is the count of total MatriculeNumbers which Begin Date is less that the start of the MonthYear from Master Calendar and higher than the end of the Month Year from MasterCalendar.
There are 2 condition to be accomplished for the function Count.
For example in Jan-2013, 3 Matricule numbers are on guaratee. That means that the three matricule numbers have Begin Date < 01/01/2013 and End Date > 31/01/2013.
In addition to the above hints you will need to resolve the Beginn to End time-span to a real date to be able to link this date to a calendar. The howto is described here:
Try to follow the example but getting loops and not the required outcome. Activity is easy on excel but on qlik have being for 6 days stucked
The "classical" intervalmatch will create a synthetic-key between the fact-table and the intervalmatch-table which is officially regarded as ok. and working by design - see the last part of the blog-posting. But it's not mandatory to keep it in this way and many join it back again. I never do it - but I like the posting because of the explanation of the logic. Personally I use internal while-loops to create the real date.
Beside of this I don't think that's your main-issue else it's your date-bridge which didn't really fit. Both approaches seems to aimed to do the same but one is too much - respectively the intervalmatch-results should be created within the date-bridge. Maybe with something like this:
bridge:
load Key, date(Beginn + iterno() - 1) as Date
resident X while Beginn + iterno() - 1 <= Ende;
so complicated... never will understand