How to use percentage of total in line graph?

Hi guys,

I have an insurance field in my dataset which has the values ​​"Yes" or “No”.
I need to put this information in a line graph showing the percentage of the total per period.

Example:
Day: 2023/01/25
Insurance:
Yes: 70%
No: 30%

Day: 2023/01/26
Insurance:
Yes: 81%
No: 19%

I can put this information using the percentage of the total in a table or pivot table, but I can’t put it in a line chart, the percentage doesn’t work.

How to do it?

Thank you so much

I tried this:

PercentOfTotal
(
sumif(distinctcount(id_customer), step = ‘effective’) — ***
,truncDate(‘DD’, order_dt)
)

*** In the effective step, I have information whether it was carried out with insurance = Yes or insurance = No. Where can I put this information in the calculated field?

Tks

Hey @July,

normally it should be enough if you if you use percentoftotal(count(insurance),) ad then filter for the value you want to see. Or you can use percentoftotal(count(ifelse(insurance =‘Yes’,insurance ,NULL),) and create a second calculated field for no. You can make also a custom y-axis range.
Hopefully that can help you

BR
Robert

2 Likes