Calculated field - percentage value between product categories

Hello guys,

I have a field “product” that I created by switch command, such as:

switch(product,
“Product A”, “tools”,
“Product B”, “tools”,
“Product C”, “eletronics”,
“Product D”, “eletronics”,
“Product E”, “tools”,
“Product F”, “tools”,
“others”)

So, I created calculated fields to summarize the quantity customers (unique) by category of product.

total_unique_customers => sum(unique_customers)
total_unique_customers_tools => sumIf(unique_customers, product = “tools”)
total_unique_customers_eletronics => sumIf(unique_customers, product = “eletronics”)

So, I need to create a bar chart to show the quantity of unique customers per day, and also, I need to show the percente the products per category of tools and eletronic(for example 40% tools and 60% eletronics) , but I couldn’t create a field to calculate percent of between them.
If I put this field in donut chart, it shows automatically, but I need put this in a bar chart.

I wait for the help

Thank you all

July.

Why can’t you make a bar chart with your totoal_unique_customers as the value and color it by product?

1 Like

Hi Max
Yes, it works… but I must show the percentage among these categories.

Would that be possible?

Best regards, July

Can you explain further what you mean among these categories? Like you have a stacked bar chart and you want to see the percentage instead of the actual value? That’s not currently possible.

However, you can make a stacked 100% bar chart and that will give you percentages.

1 Like

Hi Max,
I got it.
I am going to try to do it by stacked 100% bar chart.
Thank you.
July.

1 Like