I want to calculate sum of one variable within repeat group based on selection of option from select one

I also want to calculate sum of one variable (for example hectares) within repeat group based on selection of option from select one (example Rained or irrigated plot). I want to sum area of all irrigated plots and rained plots separately. help needed!! thanks

@seedsalp, could you kindly elaborate on your issue so that the community could help you out? Maybe share a sample XLSForm with some dummy questions and choices (for better understanding).