Dear all,
I’m looking for displaying only the greatest value by groups (here group = building reference). In the present example, I expect to display in a dashboard the last versions of the data so:
56s-Peres75006 -------------- 4 ------- < 1500
25nnequin75017 -------------- 1 ------- < 1500
987oincarre60280 -------------- 1 ------- < 1500
Etc…
I sorted my data by classifying both building reference and version but I’m npw blocked in displaying the correct view.
After “Search for Building (POR)s” click “more…” and select Group by and then select a field for grouping (build ref in your case) and Max for aggregation function.
You’d then make a text element or similar in the repeating group, and the dynamic data would be something like “current cell’s grouping’s aggregation max”.
It does not work because I only want to display the line with the highest value in a sub group (ex. version 3 of a specific building). As, I may have differents changes in the line (ex. altitude, …) the grouping does not work in this case.
Group your Building (POR) RG’s search by 00_BuildRef with max of 00_BuildingVers as an aggregation.
Put a group in your RG with a content type of Building (POR) and data source of search for Building (POR) ==> constraints: 00_BuildRef = current cell’s grouping’s 00_BuildRef AND 00_BuildingVers = current cell’s max of 00_BuildingVers; sorting = creation date (descending = yes). Be sure to add first item to the data source expression.
Put text boxes in the group for the various fields you want to display for the item.
I’m not sure that this is the most efficient way to do this but I can’t immediately think of a better way without perhaps having to resort to list-management plugins.
Thank you, this is brilliant !
If I may : it generates a new problem as I would like to display data in a popup (previously it was easy as it was "current’s cell Building (POR) ")
You’re welcome. If you place your icon in the group created in my step 2 above then you should be able to change the expression to Parent group’s Building (POR).