Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count debtors over a certain period

Hey everyone,

I'm having a problem with counting the amount of debtors from the last 28 days.

I have an expression which defines the last 28 days:
If(Today() - Date <= 28 And  Today() - Date >= 0, 1, 0) As Date_IsLast28Days

And I need to show this in a single Text Object.

This is the expression I use in the text object.

=Count({< Date2 = {"Date_IsLast28Days"}>} DISTINCT Debtor)

The expression below is what I used before, but this only gives the amount of debtors from the day 28 days ago. Not the whole period of 28 days ago:

=Count({< Date2 = {"$(=date(today()-28))"}>} DISTINCT Debtor)

What I need is the amount of debtors from the last 28 days (28 days ago - until - yesterday).

I hope someone can help me out on this one!

1 Solution

Accepted Solutions
PrashantSangle

Hi,

made below changes

=Count({< Date2 = {">=$(=date(today()-28))<=$(=date(today()))"}>} DISTINCT Debtor)


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

3 Replies
PrashantSangle

Hi,

made below changes

=Count({< Date2 = {">=$(=date(today()-28))<=$(=date(today()))"}>} DISTINCT Debtor)


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
aarkay29
Specialist
Specialist

try this

for till date and >= last 28 days

=Count({< Date2 = {">=$(=date(today()-28))"}>} DISTINCT Debtor)


for till yesterday and >= last 28 days

=Count({< Date2 = {">=$(=date(today()-28))<=$(=date(today()-1))"}>} DISTINCT Debtor)



sunny_talwar

If you have created a flag for the last 28 days, why don't you use that?

=Count({<Date_IsLast28Days = {1}>} DISTINCT Debtor)