Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Tmassimo
Contributor II
Contributor II

SET ANALYSIS

Hi,
I wrote this expression to count the customers who have a value greater than 100 for the KI sector

Count( {$<FATT_VEN_AC={">=100"}, FT_SECTOR={"KI"}>} AC_COD_RS)

but the results it provides concern customers who have a value other than 0. 

The FATT_VEN_AC measure is defined in master item with the following definition
Sum ( {$< YEAR ={$(=CURRENT_YEAR)}> } FT_AMOUNT)

and AC_COD_RS is the customer code.

can anyone help me?

Labels (1)
2 Solutions

Accepted Solutions
MatheusC
Specialist
Specialist

@Tmassimo 

I didn't mention the FT_SECTOR={"KI"} filter in the message above, but I would place it within the master measure.

Sum ({$< YEAR ={$(=CURRENT_YEAR)},FT_SECTOR={"KI"}> } FT_AMOUNT)

And then the count expression.

count(distinct{< AC_COD_RS = {"=FATT_VEN_AC>=100"}>}AC_COD_RS)


greetings!



Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!

View solution in original post

Tmassimo
Contributor II
Contributor II
Author

Thank you Matheus. It works well.

View solution in original post

4 Replies
MatheusC
Specialist
Specialist

@Tmassimo 

Try doing it like the example below:

count(distinct{< AC_COD_RS = {"=FATT_VEN_AC>=100"}>}AC_COD_RS)


Att, Matheus

 

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
MatheusC
Specialist
Specialist

@Tmassimo 

I didn't mention the FT_SECTOR={"KI"} filter in the message above, but I would place it within the master measure.

Sum ({$< YEAR ={$(=CURRENT_YEAR)},FT_SECTOR={"KI"}> } FT_AMOUNT)

And then the count expression.

count(distinct{< AC_COD_RS = {"=FATT_VEN_AC>=100"}>}AC_COD_RS)


greetings!



Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
Digvijay_Singh

May be this - 

Count( {$<AC_COD_RS = {"=Sum ( {$< YEAR ={$(=CURRENT_YEAR)}> } FT_AMOUNT)>=100"}, FT_SECTOR={"KI"}>} AC_COD_RS)

Tmassimo
Contributor II
Contributor II
Author

Thank you Matheus. It works well.