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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count distinct accounts that qualify via formula

Would like to count the unique accounts that pass or qualify via a formula.

So for example if i have 5 unique accounts, and they 3 have more sales this year than last year. I would like to count that as 3.  I would then like to get the percentage of those accounts.  So 3 out of 5 accounts would be 60 percent.

thanks in advance.

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Cehck with this

Count({<Accounts={"Sum({<Year={$(=Max(Year))>} Sales) > Sum({Year={$(=Max(Year)-1)}}Sales)"}>} Distinct Accounts) / Count(Distinct Accounts)

Not applicable
Author

I didn't get it to work.

Below is the formula i'm using to check it the store has made the expected sales.

 

=if( vCurrentYearSum >= if(vSelect='Percentage',vPreviousYearSum * vCalculate,if(vSelect='Integer',vCaseIncrease))   , 'YES','NO')

if the stores have made the sale for the selected year, month and week, then they get a YES otherwise a NO.  I'm looking for a function or formula that counts the unique stores that have a yes. so for example i have 10 stores 5 of them have a yes. That would be 50%

thanks