Skip to Content
0

Creating new variables based on existing variable

Jul 13, 2017 at 04:56 PM

66

avatar image
Former Member

Dear all,

I would like to group conditions in a variable to a smaller amount of groups in Webi, in order to show them in a line graph, which shows the sales (y) over time (x).

I am new to Webi. In SPSS I would do this through "Recode into different variables", and I want to do a similiar thing here.

At this moment, I have 6 lines, and I want to bring this back to 3.

Lets say it shows sales in 6 European countries: I want to combine Norway, Sweden, Denmark as a new group 'Scandinavia', Estonia and Latvia to 'Baltic States' and keep Russia as Russia.

How should I do this?

Kind regards,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

AMIT KUMAR
Jul 13, 2017 at 05:05 PM
0

create three variables.

Var1=([Sales]) where ([Country] inlist("Norway";"Sweden"))

Similar for others.

Share
10 |10000 characters needed characters left characters exceeded
Koen Hesters Jul 14, 2017 at 12:25 PM
0

Hi,

If you want to have it all in one dimension just create variable with formula:

var=if [Country] inlist("Norway";"Sweden") then "Scandinavia" elsef [Country] inlist("Estonia";"Latvia") then "Baltic states" else "Russia"

Share
10 |10000 characters needed characters left characters exceeded