Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Marcel_Garcia
Contributor III
Contributor III

Error dividing variables in KPI expression

Hi all,

I want to get the rate of repeats in a KPI expression.
I'm trying to divide two variables (they both work by itself):
vRepeat_Count = Count({$<[Repeat]={'1'}>}[Fault_id])
vFaults_Count = Count({$<[Repeat]={'1','0'}>}[Fault_id])

like so:

= vRepeat_Count / vFaults_Count

I tried all possible combinations with the "()", "=", "$"...
The only result I get is a triangle like a pointy arrow.
The result should be a decimal number between '0' and '1'.
Any ideas?

 

1 Solution

Accepted Solutions
Marcel_Garcia
Contributor III
Contributor III
Author

Sorted!
Was just a matter of resizing the KPI as it changed into a Gauge by itself.

View solution in original post

2 Replies
agigliotti
Partner - Champion
Partner - Champion

what you get with the below expression

Count( {< [Repeat] = {'1'} >} [Fault_id] )
/
Count( {< [Repeat] = {'1','0'} >} [Fault_id] )
?

How did you create the two variables ? in the script or front-end?

what you get doing
$(vRepeat_Count)
/
$(vFaults_Count)
?

Marcel_Garcia
Contributor III
Contributor III
Author

Sorted!
Was just a matter of resizing the KPI as it changed into a Gauge by itself.