How to create this metric

Stimulsoft BI Designer discussion
Post Reply
Mosufe
Posts: 5
Joined: Wed Apr 02, 2025 1:46 pm

How to create this metric

Post by Mosufe »

Hello, i'm trying to create a metric that calculate the percentage of itens on time. In other tools i used to use this code:

Code: Select all

1-
count(distinct
case when status_sla = 'SLA rompido' then numero_ticket end
)
/
count(DISTINCT numero_ticket)
But i can't work around how to create that with Stimulsoft, can sameone help? I've already tested some things, but none worked and i think that is'nt helpfull here.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: How to create this metric

Post by Lech Kulikowski »

Hello,

Please check the Totals functions in the Dictionary.

Thank you.
Mosufe
Posts: 5
Joined: Wed Apr 02, 2025 1:46 pm

Re: How to create this metric

Post by Mosufe »

I looked in the data dictionary and the function was supposed to be CountDistinct(field), but after some testing and with the help of the tool, I found that the correct function is DistinctCount(field). However, I wasn't able to get the rest of the function to work... Below is the code:

Code: Select all

1-
DistinctCount(IF(vw_mtz_tk_solicitacao_servico_v3.status_sla = 'SLA Rompido', vw_mtz_tk_solicitacao_servico_v3.numero_ticket, NULL)
/DistinctCount(vw_mtz_tk_solicitacao_servico_v3.numero_ticket)
Anyway, thx for the help.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: How to create this metric

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
Post Reply