2

In ArcMap when I use Categorized I can choose what values I want to display using the "Add Values" button. In layer panel the values I chosen will show up there with the correct name.

I tried the same in Qgis, but the values doesnt show, I only get a number 1 and 0 but not the actual name in the column of the attribute-table.

Here is how I do: I got a layer with streets as polylines, each street has a streetname assigned to them in the attribute-table under the column "STREETNAME".

I go to "Properties->Style->Categorized".

Then I click the "Expression" button. In the "Expression Dialog" I create the following "expression".

"STREETNAME = 'ADAGE WY' Image showing the Expression dialog window

Here comes the problem, after I clicked "OK" and then "Classify" to classify based on the expression I dont get any values in the value column. Image showing the Layer Properties window and the values

Is it supposed to work that way or am I doing something wrong? I was hoping that the streetname "ADAGE WY" would show as a "Value".

5

This result is correct, because you write expression "STREETNAME" = 'ADAGE WY' which gives you categories 1 (true) and 0 (false).

You can rename the legend value, or in Column left only "STREETNAME" and hit Add button and write value ADAGE WY

  • Is there any way to get the label automatically, to avoid users from writing in the wrong value/name? – esset Dec 20 '16 at 10:26
  • Don't know if there is some simple solution. It would be nice to have option after hitting Add button choose value from list or similar feature. – Oto Kaláb Dec 21 '16 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.