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

Expression Help Mulitple Count IF

Hi,

I have an expression but I need to add multiple count if's?  What I have so far is below;

Count(DISTINCT(if(APCheck.PaymentDate-RangeMax(APInv.InvoiceDate,Alt(APInv.InvoiceReceivedDate,0),Alt(APInv.GoodsReceivedDate,0))<31,[APInv.InvoiceId])))

This works ok but I need to add the following;

[APInv.VendorType]="TAX"

Are you able to help?

1 Reply
marcus_sommer

Maybe in this way:

Count({< [APInv.VendorType]={'TAX'}>} DISTINCT if(APCheck.PaymentDate - RangeMax(APInv.InvoiceDate,APInv.InvoiceReceivedDate,APInv.GoodsReceivedDate) <31, [APInv.InvoiceId])

Within a range-function won't be needed an alt-function. An invalid result will be as 0 handled. But you might need aggregation-functions for the range-parameter like:

max({< [APInv.VendorType]={'TAX'}>} APInv.InvoiceReceivedDate) or

only({< [APInv.VendorType]={'TAX'}>} APInv.InvoiceReceivedDate)

with or without set analysis filter then an access on a field returned only a valid result if there is an unique value.

- Marcus