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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rajkumarb
Creator II
Creator II

Between days

Hi all I want to count the in between days of sales and credit with some filters

actual calculation works in a table, but need to work in text object

interval(SALES_Date - CREDIT_DATE,'d')

FILTERS

=({<Brand = {'Shoe'},Mode={'Direct'}>}

Please Suggest

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

If this filter reduces to a single possible value, you could use expression like:

=Only({<Brand = {'Shoe'},Mode={'Direct'}>} interval(SALES_Date - CREDIT_DATE,'d'))

For multiple possible values, you might want to use Sum() instead, like:

=Sum({<Brand = {'Shoe'},Mode={'Direct'}>} interval(SALES_Date - CREDIT_DATE,'d'))


Or, if you see the result is coming in multiples of expected value, you might just have to use DISTINCT, like:

=Sum(DISTINCT {<Brand = {'Shoe'},Mode={'Direct'}>} interval(SALES_Date - CREDIT_DATE,'d'))

View solution in original post

2 Replies
tresB
Champion III
Champion III

If this filter reduces to a single possible value, you could use expression like:

=Only({<Brand = {'Shoe'},Mode={'Direct'}>} interval(SALES_Date - CREDIT_DATE,'d'))

For multiple possible values, you might want to use Sum() instead, like:

=Sum({<Brand = {'Shoe'},Mode={'Direct'}>} interval(SALES_Date - CREDIT_DATE,'d'))


Or, if you see the result is coming in multiples of expected value, you might just have to use DISTINCT, like:

=Sum(DISTINCT {<Brand = {'Shoe'},Mode={'Direct'}>} interval(SALES_Date - CREDIT_DATE,'d'))

Anil_Babu_Samineni
MVP
MVP

May be this?

=Only({<Brand = {'Shoe'},Mode={'Direct'}>} interval(SALES_Date - CREDIT_DATE,'d'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful