I have a CSV-Layer with multiple columns (e.g. ID, owner_name) and well-known text data to contain information about polygons. One ID can be owned by to owners which would cause the feature to appear twice in the attribute table. I further created a virtual field which concentrates all owners into it.
The code of the virtual field looks like this
concatenate("owner_name" ,group_by:= "ID",concatenator:=', ',order_by:= "owner_name")
This results in a attribute table as follows
| ID | owner_name | all_owners [virtual field] |
|---|---|---|
| 1 | Simon | Simon |
| 2 | Erica | Erica, Peter |
| 2 | Peter | Erica, Peter |
| 3 | Simon | Simon |
Now I want to the atlas to iterate through all unique values in the all_owners column. In this case:
- Simon
- Erica, Peter
Important: I do not want to create new (static) layers and use the dissolve function as the data in the "CSV"-Layer might get changed later on and everything shall get updated.
Note: The answer to this similar question (look here) does not work, as Virtual Layers cannot get access to virtual fields as far as I tried.

select * from my_csv_layerand check that the virtual layer was pulled through and then just switch to selectingdistinct column_name– Hugh_Kelley Mar 23 '23 at 15:30I guess this happens because the virtual layer accesses the original CSV-file (which is not containing the virtual field) and not the imported CSV-layer (which contains the virtual field)
– gissurfer Mar 23 '23 at 15:37