Skip to Content
avatar image
Former Member

Creating new variables based on existing variable

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 13, 2017 at 05:05 PM

    create three variables.

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

    Similar for others.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 14, 2017 at 12:25 PM

    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"

    Add comment
    10|10000 characters needed characters exceeded