Creating a group report based on an object attribute

419
2
07-16-2023 05:11 PM
AlexWierzbicki
New Contributor II

I am trying to create a code that generates group reports based on an object attribute Land_Use, which has 51 text values. 

However, when I add the below code I get 51 individual reports

 

@StartRule
Generate-->
	report(Land_Use, geometry.area/10000)

 

Like so:

AlexWierzbicki_0-1689552552808.png

and when I use either of the two codes below I get only reports on the entire object attribute.

 

@StartRule
Generate-->
	report("total.Land_Use", geometry.area/10000)
@StartRule
Generate-->
	report("Commercial Accomodation", geometry.area/10000)

 

Like so:

AlexWierzbicki_1-1689552605494.png

I've also tried adding much more complex code to separate out each attribute variable and then group, but it has had the same result. 

This means my ability to use the dashboard function to analyse this data is limited. Can someone please help me as to where I'm going wrong? 

2 Replies
plfontes
Occasional Contributor

If I understood correctly your question, the solution is:

@StartRule
Generate-->
	report("total." + Land_Use, geometry.area/10000)

 

Hope this is what you are looking for.

0 Kudos
DevinLavigne
Occasional Contributor III

@plfontes is right...the period is key....so total.LANDUSE will aggregate everything and allow you to see the "total" area and the total by each individual LANDUSE

0 Kudos