Discussion Board for collaboration on QlikView Scripting.
Hi, I have the problem, that I would like to calculate something per month compared to an value per year. In Table 1 there are the months and in Table 2 there are the year.
I want to calculate in this way:
A_Jan / A;
A_Feb / A
A_Mär / A
B_Jan / B;
B_Mär / B
How could I handle this? Any Idea? Thank you for help!
Go to Solution.
Please find this.
ThousandSep='.';SET DecimalSep=',';SET MoneyThousandSep='.';SET MoneyDecimalSep=',';SET MoneyFormat='€ #.##0,00;-€ #.##0,00';SET TimeFormat='hh:mm:ss';SET DateFormat='DD/MM/YYYY';SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';SET MonthNames='gen;feb;mar;apr;mag;giu;lug;ago;set;ott;nov;dic';SET DayNames='lun;mar;mer;gio;ven;sab;dom';Table_1:load * inline[month,valMonthA_Jan, 10 A_Feb, 13 A_Mar, 13 A_Apr, 15B_Jan, 10B_Feb, 15B_Mar, 14];Table_2:LOAD * Inline[year,valYearA, 3B, 2C, 4];T1:NoConcatenateLOAD *, left(month,1) as yearResident Table_1; Left JoinTable_2:LOAD * Inline[year,valYearA, 3B, 2C, 4];
Hope it helps
Thank you for your fast answer, but I think you got me wrong. Think, I explained bad - sorry.
My problem is, that I don't know how to divide the diffrenet values as there is a different number of lines in the tables:
Table 1 Table 2 = Result
A_Jan (10) : A (3) = 3,33
A_Feb (13) : A (3) = 4,33
A_... (xy) : A (y) = x
B_Jan : B =
B_Feb : B =
and so on.. I have a lot of different types.
Hope it is esasier now!?
Well, but I think that you are a step before the solution because you have now a table where in each row you have values
year month valyear valmonth
so you just have to compute valmonth / valyear for each row and then sum or aggregate or count or ... the result ... am I wrong?
Ok, now I understand ...
How will I get the result in the second step? How can I tell QV to compare the right rows.
Thank you for your patience.
tell me what kind of graphical representation do you want and I'll try to help, let me know fields (columns) you want.
Perfect, thank you very much!!!