# CustomWidget PopOver - Item from parameter does not use the configuration of the specific widget, but the last widget

**URL:** <https://community.openhab.org/t/customwidget-popover-item-from-parameter-does-not-use-the-configuration-of-the-specific-widget-but-the-last-widget/113980>\
**Category:** UIs\
**Tags:** widget, openhab3\
**Created:** [January 12, 2021, 8:22pm UTC](https://community.openhab.org/t/customwidget-popover-item-from-parameter-does-not-use-the-configuration-of-the-specific-widget-but-the-last-widget/113980 "2021-01-12T20:22:50Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![curlyel](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/71e660/32.png) [@curlyel](https://community.openhab.org/u/curlyel)\
**Post date:** [March 23, 2021, 11:44am UTC](https://community.openhab.org/t/customwidget-popover-item-from-parameter-does-not-use-the-configuration-of-the-specific-widget-but-the-last-widget/113980/28 "2021-03-23T11:44:39Z")

</div>

> [@Stephan\_K](#):
>
> explain me how did you count

Sure 😉

That’s a good question, since the solution is not that obvious in openHAB3 😉

When checking the documentation for aggregation functions you may have noticed the `COUNT()` aggregation:

> **[Items](https://www.openhab.org/docs/configuration/items.html#derive-group-state-from-member-items)**
>
> a vendor and technology agnostic open source automation software for your home

Unfortunately, **the COUNT() aggregator is not selectable in the MainUI** of openHAB3.

BUT: You can work around that limitation by importing group items with COUNT() aggregators from textual configuration:

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/d/0/d0f4bf0284355e48fb7900a12b7db860e5ba1d2f.png)

This essentially adds two groups where one counts for empty and another count for good batteries.

A third group simply sums up the both which provides me the total number of batteries:

`NumOfEmptyBatts + NumOfGoodBatts = TotalNumOfBatts`

All BatteryLow-items belong to both count-groups - that’s it 😉

---

_[View the full topic](https://community.openhab.org/t/customwidget-popover-item-from-parameter-does-not-use-the-configuration-of-the-specific-widget-but-the-last-widget/113980)._
