COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: bartburg on 24 Nov 2015 02:52:30 AM

Title: difference between 2 rows
Post by: bartburg on 24 Nov 2015 02:52:30 AM
so i have a report that gives the following output

name      rowcount    vehicle    date
---------|----------- |----------|----------
Jane          1             car         1-1-2015
Jane          2             car         2-1-2015
Jane          3             plane      4-1-2015
Joe            1             car         3-1-2015
Joe            2             Plane      2-3-2015
Mark          1             plane     1-2-2015
Mark          2             plane      2-2-2015


Above is just a short list example of what i have the list is much longer and more differances between column c

so here is the question how do i get the output where i only see the 2/3 jane car/plane and joe 1/2 car/plane thats question 1

question 2 how can i make a percentage of switching vehicles so mark did not switch but joe an jane did so xx% made a switch?
how can  i make this within reportstudio with the data from above
Title: Re: difference between 2 rows
Post by: BigChris on 24 Nov 2015 03:36:20 AM
Hi Bartburg,

Can you sketch out what you're hoping to get as your output? Looking at your example, a starting point might be to group on Name and Vehicle and to take the maximum date for each combination. Your second question is a bit more difficult...for Jane do you want the answer to be 50% (two vehicles, one change) or 33% (three journeys, one change)?
Title: Re: difference between 2 rows
Post by: bartburg on 24 Nov 2015 03:43:01 AM
bigChris i will try to explain:

in Q1 i just want a list of ppl that made a change so that will be jane and joe in the output and leave mark out of it.

the second one is how many actual changes where made again it would concern Jane and Joe they made the change Mark did not. so in percentage it would be 1/3 did not change or 2/3 made a change depending on how u see it.