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

Get number of invoices over $100 000

Hi all

I start by making some example data. We have a table with invoice lines, like this:

Invoice_NumberAmount
1$ 80 000
1$ 50 000
2$ 120 000
3$ 10 000
3$ 20 000
3$ 10 000
4$ 70 000

Now I need a text object which displays the number of invoices with a total of at least $ 100 000. In this example 2 (Invoice number 1 and 2). But I can't get it to work in QlikView.

I tried different formulas with the AGGR and SUM functions, and I get all kinds of strange results, but not the correct one. Can someone help me to get the formula correct?

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi,

=Count(DISTINCT{<Invoice_Number ={"=Sum(Amount)>100000"}>}Invoice_Number)

View solution in original post

9 Replies
Anonymous
Not applicable

try like:

=if(sum(Amount)>'$ 100000', count(distinct(Invoice_Number)))

tamilarasu
Champion
Champion

Hi,

=Count(DISTINCT{<Invoice_Number ={"=Sum(Amount)>100000"}>}Invoice_Number)

Anonymous
Not applicable

or

=if(sum(Amount)>'100000', count(distinct(Invoice_Number)))


Make sure format of Amount should be number

Not applicable

Hi christian

try this one

=count(distinct Aggr(sum(amount)>=100000,Invoicenumber))

hfkchristian
Creator
Creator
Author

This works. Thanks

hfkchristian
Creator
Creator
Author

Thanks, but this formula didn't work for me. I used Tamil's soluotion instead.

anlonghi2
Creator II
Creator II

Hi Christian,

try with this:

=count(if(aggr(sum(replace(Amount,' ','')),Invoice_Number)>100000,1))


Best regards

Andrea

awhitfield
Partner - Champion
Partner - Champion

Hi Christian,

see attached example, this is using

='Number of Invoices $100 000 and over  ' & Count(DISTINCT{<Invoice_Number ={"=Sum(Amount)>100000"}>}Invoice_Number)

HTH Andy

tamilarasu
Champion
Champion

You are welcome christian.