I have 2 pages as part of a multi-page composition in the print composer (QGIS 3.6) and for each page an export condition depending on the attribute value of the feature. This means that based on the attribute value of the feature it is decided whether the feature is printed in a vertical format (page 1) or in a horizontal format (page 2). For all features that are exported with the condition that triggers page 2 to be exported, a suffix with page number "2" is added. The file names of the output images therefore look like this:


I dont' want a suffix to be addded for all images that are produced with the export condition of page 2. Is there a way to do this with the Atlas function of QGIS3.6?

1 Answer 1


Many solutions IMHO. In the layout 'Atlas' tab, edit the output expression formula :

Solution 1 :

attribute(@atlas_feature, 'my_atlas_layer_field_name')

Search the original data in the atlas layer with the attribute function and the variable @atlas_feature.

Solution 2 :

if(substr(@atlas_pagename, -2, 2) = '_2',
substr(@atlas_pagename, 1, length('feat1_name_2') - 2),

If the variable @atlas_pagename finish with _2, trim it, otherwise, give the whole pagename.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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