Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld May 10-12, Online and Free! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Marcel_Garcia
Contributor II
Contributor II

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 II
Contributor II
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
Partner

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 II
Contributor II
Author

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

View solution in original post