Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Zaga_69
Creator
Creator

Set Analysis Count If

Hi guys,

 

I want to count the number of profit center with NPM Total Sales NC <=0

pivot table qlik.PNG

 

I used the following formula, but it does not work:

count({<sum(NPM_TOTAL_SALES)={0}}> PROFIT_CENTER)

 

Any idea,

Many thanks,

Edi

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Count({<PROFIT_CENTER = {"=Sum(NPM_TOTAL_SALES) <= 0"}>} PROFIT_CENTER)

View solution in original post

4 Replies
sunny_talwar

Try this

Count({<PROFIT_CENTER = {"=Sum(NPM_TOTAL_SALES) <= 0"}>} PROFIT_CENTER)
Zaga_69
Creator
Creator
Author

Hi Sunny

many thanks. It works perfectly. I really appreciate your help.

 

I used sth like this:


Count(distinct {<PROFIT_CENTER = {"=Sum(NPM_TOTAL_SALES) <= 0"}>} PROFIT_CENTER)

I have still a question. Can you please explain me in a brief manner how this formula works? because I do not understand why you put PROFIT_CENTER  twice. 

regards,

Edi

sunny_talwar

So, within the set analysis, the expression is checking if Sum(NPM_TOTAL_SALES) is less than or equal to 0 for a PROFIT_CENTER. If it is, then include it in the calculation... if not then exclude it.

Zaga_69
Creator
Creator
Author

Hi Sunny,

Can you please be kind and explain what you have set up "" into the set analysis and the = which precedes the Sum function.

Best regards,

Edi