Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Manisha1407
Contributor III
Contributor III

Next 7 days receivable KPI

Hi Team,

I want to make a KPI to see amount receivable/due in next 7 days or 30 days

Data as follows:

Invoice Number Document date Duedate Rbalance
CIN1010110 24-05-2023 24-05-2023 5000
CIN2039291 24-05-2023 31-05-2023 15000
CIN3446462 24-05-2023 15-06-2023 26000

 

I am using the below set analysis but 0 is coming as result. (Result should be 20,000)

=sum({<DueDate = {">=$(=Today())<=$(=Today()+7)"}>}RBallance)

 

Can you please advise where i am going wrong and what should be the best solution to get this KPI.

 

Labels (2)
1 Solution

Accepted Solutions
Manisha1407
Contributor III
Contributor III
Author

Hi Team,

Thanks for your response, but i was unable to get the result with above mentioned expression.

 

However i found out one workaround expression.

sum(if(DueDate>=date(Today()),RBallance))-sum(if(DueDate>date(Today()+Vdays),RBallance))

Hope this help someone in their future requirement.

 

Thanks for your time and guidance.

 

Regards

Manisha Tehliyani

View solution in original post

10 Replies
Chanty4u
MVP
MVP

Try this 

=sum({<Duedate = {">=$(=Date(Today(), 'DD-MM-YYYY'))<=$(=Date(Today()+7, 'DD-MM-YYYY'))"}>} Rbalance)

 

Manisha1407
Contributor III
Contributor III
Author

Hey!! thanks for the reply but still the same result.

Manisha1407_0-1684923835828.png

 

Manisha1407
Contributor III
Contributor III
Author

Note: 

Rbalance is not a measure, its a field.

Is this a reason for 0 value.

However if i am making KPI as Sum(Rbalance) it is showing correct value.

Chanty4u
MVP
MVP

just try only this and tell me the results

 

in the expression editor on bottom you will see the expresion results.

=sum({<Duedate = {{">= $(=Date(Max(Duedate)+7, 'DD-MM-YYYY'))"}>} Rbalance)

Manisha1407
Contributor III
Contributor III
Author

Hi,

 

Result with your original suggestion.

Manisha1407_0-1684988711730.png

Result with your second suggestion.

Manisha1407_1-1684988795047.png

 

 

Chanty4u
MVP
MVP

in your first expression  you can use  +7   instead of  +0  and try .?

Gabbar
Specialist
Specialist

Gabbar_0-1685007269969.png

In script.


in expression:-
=sum({<Duedate={">=$(=Date(Today(),'DD-MM-YYYY'))<=$(=Date(Today()+7,'DD-MM-YYYY'))"}>}Rbalance)



output:-

Gabbar_1-1685007325786.png


Set as today so 5000 of 24th may not coming

 

Manisha1407
Contributor III
Contributor III
Author

Hello,

The expression is showing as Okay but the data is still not coming. Rballance is a field not a measure, is it because of that.

Manisha1407_0-1685077571728.png

 

Gabbar
Specialist
Specialist

Please use that expression as a measure, it should work and is it doesnt,

please take a picture on your data model viewer where you have clicked on DueDate, I want to know its data type, it need to be timestamp.