Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
petermoyaert
Contributor III
Contributor III

New clients

We have a field available with date of creation of new client, called "Since_Client".

I want to see sales of clients that became client in the period since today minus 180days. I have a variable that is called "vMaxDate" but when I start to deduct 180 days it fails.

5 Replies
sujeetsingh
Master III
Master III

Peter,

try using $(variable) Hence you can calculate the difference as


Interval(vMaxDate-Since_Client,'dd')

swuehl
MVP
MVP

Create a chart with dimension Customer and as expression something like

=Sum({<Since_Client = {">=$(=Date(Today()-180))"}>} Sales)

You need to check that format of Since_Client and the set modifier created using dollar sign expansion is matching.

preminqlik
Specialist II
Specialist II

just replace today() with your vMaxDate in Swuehl exp and also by pass any other calendar Category like below


=Sum({<Since_Client = {">=$(=Date(num(vMaxDate)-180))"},Year=,Month=,Day=>} Sales)

petermoyaert
Contributor III
Contributor III
Author

Thank you all for the feedback. It works.

avinashelite

Hi Peter,

If you have got the answer , mark the correct answer and close this thread so that it will others too