Count data points

Hello, I would like to include a parameter in the tooltip that displays, for each data marker on my graph (e.g., the average price in month x), the number of data points or observations it is derived from. To put it differently, I am seeking an alternative to the ‘count’ option when adding a field as a tooltip, something akin to a ‘count if’ functionality. Any suggestions?

Hello @svela !

Can give more detail on the types of data points and observations that and how you want them counted?

In the tool tip you can add extra fields. For example you could add a calculated field to your tooltip that uses a parameter.

Hello Duncan,

Allow me to provide a more specific example: I have a line chart with the x-axis representing months and the y-axis representing prices. The data markers on the chart display the average price of all products for each month. To display the number of observations in the tooltip, I can easily include a count field. Now, I’ve added an extra line with a specific product_id filter to display the price for only one particular product. When I hover over this line, I would like to see the number of observations that contributed to the calculation of this filtered line. How can I achieve this?
Thank you!

Hello @svela , I’m sorry for the late reply, I was OOO recently and am trying to catch up on old messages! Thank you you for providing more detail. Are you still running into this problem?

You could try creating another calculated field that utilizes the parameters in the same way but instead either returns 1 or null. Then add that to the tooltip and get the desired outcome.