Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nigharikkha
Contributor II
Contributor II

Mathematical Calculation

Hi 

I have a table with fields as shown below (sample data).

nigharikkha_0-1643897179299.png

I need to calculate the failure rate and display in the text box.

Failure Rate = (Number of distinct Label with Fail=1) / Number of distinct Label

In this example, Number of distinct Label with Fail=1 is 1 and Number of distinct Label is 2.

Please help with the expression for this.

1 Solution

Accepted Solutions
nigharikkha
Contributor II
Contributor II
Author

I completed this using the below expression in the text box.

=Count(distinct{<Fail = {1}>}Label) & ' / ' &Count(distinct Label)

View solution in original post

1 Reply
nigharikkha
Contributor II
Contributor II
Author

I completed this using the below expression in the text box.

=Count(distinct{<Fail = {1}>}Label) & ' / ' &Count(distinct Label)