How to calculate percentages using data from three different data types

Hi all, I’ve recently started working with bubble and it’s been going great.

[grid]




I’m trying to get the percentage of tyres, grouped by a tyre brand, on all the vehicles from the highest to the 5th most used tyre brand, but i just can’t seem to get the dynamic text correct for it.

Then I’m also trying to display the brand name which is linked to that specific percentage in another textbox

The last screenshot is where i want my the percentages to be in textboxes

I Don’t know the data source of your RG, let’s say it’s BRAND, so the dynamic text to show percentage of tyres for each BRAND will be ;

Current cell’s vehicle Tyre count /100 of Vehicles,

Obviously, under Datatype BRAND, you should have a thing called vehicles…

Which repeating group are you talking about?

I’ve used text elements to display the statistics of the percentages and the names of the tyre brand. The data source for the percentage text element is tyre.

the text boxes where you show brand and % of vehicles - this should be a repeating group

the repeating group would be tyre brand

the percentage… now that can be done a few ways

searches within repeating group
5 tyre brands = 5 searches + 1 search for the total count = 6 aggregate searches = 1.2wu

group by search
the other way to do it would be search of vehicles, grouped by brand type (brand is on vehicle) : count
wu = 0.3wu

calc and store
and another way would be a backend workflow to do the counts and calcs and then store them as numbers on the tyre brand - then just show those numbers on the page (no searches, no groups:count)
high wu cost and headache to keep updated

1 Like

Appreciate the help man it worked.

This topic was automatically closed after 69 days. New replies are no longer allowed.