Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
lucasx15
Contributor III
Contributor III

TOTAL with set analysis

I have the following problem, I need to carry out a measurement of customers who purchased products in a period less than or equal to 30 days after leaving in relation to the total number of customers who access the site. Ignoring the defective products group, I am using the TOTAL attribute. But I'm having trouble applying it.

My dimension is: FL_RETURN. It is dimensioned contains:

1 - Up to 72 Hours
2 - Up to 15 Days
3 - Up to 30 Days
4 - Up to 45 Days
5 - Up to 60 Days

 

My expression:

COUNT({<CD_EXIT_ALT={12}, // where I consider the exits of a certain category
IE_PRODUCT-={3,5}, // ignore defective products
FL_RETURN={'1 - By 72 Hours'} // I put this test flag inside my analyze set
>>
TOTAL DISTINCT NR_CLIENT)
/
COUNT({<CD_EXIT_ALT={12},
IE_PRODUCT-={3,5} // ignore defective products
>} DISTINCT NR_CLIENT)
Labels (1)
1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

I guess you have to remove FL_RETURN={'1 - By 72 Hours'} from the numerator as below:

COUNT( {< CD_EXIT_ALT={12}, IE_PRODUCT-={3,5} >} DISTINCT NR_CLIENT )
/
COUNT( {< CD_EXIT_ALT={12}, IE_PRODUCT-={3,5} >} TOTAL DISTINCT NR_CLIENT)

View solution in original post

3 Replies
agigliotti
Partner - Champion
Partner - Champion

Hi @lucasx15 ,

The TOTAL keyword is used to ignore all chart dimensions values.

Maybe this:

COUNT({<CD_EXIT_ALT={12},
IE_PRODUCT-={3,5},
FL_RETURN={'1 - By 72 Hours'}
>>
DISTINCT NR_CLIENT)
/
COUNT({<CD_EXIT_ALT={12},
IE_PRODUCT-={3,5}
>} TOTAL DISTINCT NR_CLIENT)

I hope this can helps.

Best Regards

lucasx15
Contributor III
Contributor III
Author

Hello, thank you very much for the answer and for the help.

I decided to insert all the fields of my expression in the set analysis of  FL_RETURN.

 It now looks like this:

FL_RETURN={' 1 - Up to 72 Hours',' 2 - Up to 15 Days', ' 3 - Up to 30 Days',' 4 - Up to 45 Days', ' 5 - Up to 60 Days' }


And I separated the expression into numerator and denominator. However, I couldn't understand why the values ​​were the same in all rows and columns and I couldn't understand. Since it was for each line to have a different value. Sorry, it's because I'm new to Qlikview.

lucasx15_0-1675348965683.png

 

agigliotti
Partner - Champion
Partner - Champion

I guess you have to remove FL_RETURN={'1 - By 72 Hours'} from the numerator as below:

COUNT( {< CD_EXIT_ALT={12}, IE_PRODUCT-={3,5} >} DISTINCT NR_CLIENT )
/
COUNT( {< CD_EXIT_ALT={12}, IE_PRODUCT-={3,5} >} TOTAL DISTINCT NR_CLIENT)