Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I need to populate the score column(marked in red). I have used the count function(count (Score#)) in the script to populate the output of the value available in Score#(ie. 43). I need a solution in script to populate the Score column with all the values of quarter as same as Q1(ie 43). Please if anyone can help with the solution.
Qtr | Score # | Score |
Q1-15 | 43 | 43 |
Q2-15 | 0 | 43 |
Q3-15 | 0 | 43 |
Q4-15 | 0 | 43 |
Q1-16 | - | 43 |
Q2-16 | - | 43 |
Q3-16 | - | 43 |
Q4-16 | - | 43 |
Use the below, this is assuming your data is properly sorted.
LOAD Qtr,
[Score #],
if(RowNo()=1,[Score #],Peek(Score)) as Score
FROM
[https://community.qlik.com/thread/243395]
(html, codepage is 1252, embedded labels, table is @1);
What if Q2-2015 was a greater number, what would you want then? please explain the exact basis of populating the nem column
Qtr | Score # | Score |
Q1-15 | 43 | 43 |
Q2-15 | 50 | 43 |
Q3-15 | 0 | 43 |
Q4-15 | 0 | 43 |
Q1-16 | - | 43 |
Q2-16 | - | 43 |
Q3-16 | - | 43 |
Q4-16 | - | 43 |
Hi Vineeth,
I understand that it can be many scenario, but in this case it would be only 1 value the one which am populating as per the business logic. Its customer requirement. There wont be any value going forward.
hope its bit clear now. Please let me know if its not.
Use the below, this is assuming your data is properly sorted.
LOAD Qtr,
[Score #],
if(RowNo()=1,[Score #],Peek(Score)) as Score
FROM
[https://community.qlik.com/thread/243395]
(html, codepage is 1252, embedded labels, table is @1);
Thanks Vineeth.
Hi,
another solution might be:
table1:
LOAD Dual(Qtr,AddMonths(Date#(Right(Qtr,2),'YY'),(Mid(Qtr,2,1)-1)*3)) as Qtr,
[Score #]
FROM [https://community.qlik.com/thread/243395] (html, codepage is 1252, embedded labels, table is @1);
Join
LOAD FirstSortedValue([Score #],Qtr) as Score Resident table1;
hope this helps
regards
Marco
Thanks Marco.. Even this solution is working..
Your solution are always unique!! Thank You!!!
thanks
glad you like it.
regards
Marco