Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
I have the following chart that presents number of success/failures by build(Version)
My goal is to show data only for the last 5 versions.
Can you please help me with how to acheive it?
Eli.
Hello,
So the expected values are
6.2.32247 |
6.2.32263 |
6.2.32273 |
6.2.32287 |
6.2.32313 |
I have used below script. Please check if that works for you.
Table:
Load BuildNumber,PASSED,FAILED, RowNo() as NumBuildNumber Inline [
BuildNumber,PASSED,FAILED
6.2.32030, 89%, 11%
6.2.32050, 75%, 25%
6.2.32051, 71%, 29%
6.2.32053, 100%, 0%
6.2.32055, 98%, 2%
6.2.32056, 47%, 53%
6.2.32061, 100%, 0%
6.2.32074, 45%, 55%
6.2.32077, 93%, 7%
6.2.32078, 98%, 2%
6.2.32085, 100%, 0%
6.2.32107, 98%, 2%
6.2.32108, 92%, 8%
6.2.32113, 54%, 46%
6.2.32115, 98%, 2%
6.2.32133, 100%, 0%
6.2.32136, 95%, 5%
6.2.32138, 47%, 53%
6.2.32141, 100%, 0%
6.2.32149, 97%, 3%
6.2.32152, 91%, 9%
6.2.32155, 100%, 0%
6.2.32159, 98%, 2%
6.2.32164, 98%, 2%
6.2.32167, 100%, 0%
6.2.32172, 94%, 6%
6.2.32187, 98%, 2%
6.2.32195, 98%, 2%
6.2.32203, 98%, 2%
6.2.32211, 100%, 0%
6.2.32216, 98%, 2%
6.2.32218, 100%, 0%
6.2.32247, 100%, 0%
6.2.32263, 100%, 0%
6.2.32273, 100%, 0%
6.2.32287, 100%, 0%
6.2.32313, 94%, 6%
];
Exit Script;
Output :
Measure for Failed : Sum({<NumBuildNumber = {">=$(=Max(NumBuildNumber)-5)"}>}FAILED)
Measure for Passed : Sum({<NumBuildNumber = {">=$(=Max(NumBuildNumber)-5)"}>}PASSED)
Note : You need to make sure the sorting order of the data.
Thanks,
Ashutosh
Hello,
How about giving Rank to every version and taking last 5 ranks.
Could you please provide any sample data ?
Thanks,
Ashutosh
Attached in xlsx format.
Hello,
So the expected values are
6.2.32247 |
6.2.32263 |
6.2.32273 |
6.2.32287 |
6.2.32313 |
I have used below script. Please check if that works for you.
Table:
Load BuildNumber,PASSED,FAILED, RowNo() as NumBuildNumber Inline [
BuildNumber,PASSED,FAILED
6.2.32030, 89%, 11%
6.2.32050, 75%, 25%
6.2.32051, 71%, 29%
6.2.32053, 100%, 0%
6.2.32055, 98%, 2%
6.2.32056, 47%, 53%
6.2.32061, 100%, 0%
6.2.32074, 45%, 55%
6.2.32077, 93%, 7%
6.2.32078, 98%, 2%
6.2.32085, 100%, 0%
6.2.32107, 98%, 2%
6.2.32108, 92%, 8%
6.2.32113, 54%, 46%
6.2.32115, 98%, 2%
6.2.32133, 100%, 0%
6.2.32136, 95%, 5%
6.2.32138, 47%, 53%
6.2.32141, 100%, 0%
6.2.32149, 97%, 3%
6.2.32152, 91%, 9%
6.2.32155, 100%, 0%
6.2.32159, 98%, 2%
6.2.32164, 98%, 2%
6.2.32167, 100%, 0%
6.2.32172, 94%, 6%
6.2.32187, 98%, 2%
6.2.32195, 98%, 2%
6.2.32203, 98%, 2%
6.2.32211, 100%, 0%
6.2.32216, 98%, 2%
6.2.32218, 100%, 0%
6.2.32247, 100%, 0%
6.2.32263, 100%, 0%
6.2.32273, 100%, 0%
6.2.32287, 100%, 0%
6.2.32313, 94%, 6%
];
Exit Script;
Output :
Measure for Failed : Sum({<NumBuildNumber = {">=$(=Max(NumBuildNumber)-5)"}>}FAILED)
Measure for Passed : Sum({<NumBuildNumber = {">=$(=Max(NumBuildNumber)-5)"}>}PASSED)
Note : You need to make sure the sorting order of the data.
Thanks,
Ashutosh
Thanks @AshutoshBhumkar, nice solution!