Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I need to know the sum of Hours (horas) of the distinct values of a dimension (Curso).
Here's what my expression for the KPI looks like:
=Sum({$ <Curso =- {''}>} Horas)
I thought I could use =Sum({$ <distinct Curso =- {''}>} Horas), but that's not allowed.
In the following image, the Kpi should display 44 instead of 88, as 2 + 10 + 16 + 8 + 8 = 44.
Here's another example:
It should display 181 as that is the result of 25 + 24 + 60 + 24 + 40 + 8
What am I doing wrong?
Thank you in advance.
Try this
Sum(Aggr(
Sum(DISTINCT {$<Curso =- {''}>} Horas),
Curso, Servidor, Ano))
Try this
Sum(Aggr(
Sum(DISTINCT {$<Curso =- {''}>} Horas),
Curso))
I thought it worked as the kpi was displaying the correct numbers, until I came across this:
I filtered it by year. It's the same course taken by four different employees. It should count as 8 * 4 hours, but it's only counting the course once.
Why is that?
And thank you for answering 🙂
Try this
Sum(Aggr(
Sum(DISTINCT {$<Curso =- {''}>} Horas),
Curso, Servidor, Ano))
It worked!
Thank you 🙂