Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a set expression which returns the number of employees fulfilling the below criteria
=Count (Distinct {$<Rundate={$(vRundate)}, Maxdate={'<$(vMaxdate)'} >} EmpID)
where vRundate is 201401 and vMaxdate is 201408
Now my query is that i want to put this in a chart where my dimension will be Month and vRundate and vMaxdate will change based on Month.
Right now its a variable and can store only one value at a time but since my chart will have Month as dimension and it will have values from Jan-Aug so my variable value should change for every month as highlighted in the table below.
Month | vRundate | vMaxdate |
Jan | 201401 | 201402 |
Feb | 201402 | 201403 |
Mar | 201403 | 201404 |
Apr | 201404 | 201405 |
May | 201405 | 201406 |
Jun | 201406 | 201407 |
Jul | 201407 | 201408 |
How can i do this ? Can we write expression inside a set expression and pass values of Rundate and Maxdate like Rundate= Max(Month)+1 or simething like this ?
Thanks a lot in advance,
Sumit
Ok!
Hi Gauarv,
I don't understand whatever you are saying. Could you please explain with an example.
Thanks a lot,
Sumit
Hi
If you have two date fileds
then you can write the expression like
count({<rundate ={'$(=max(Left(date(rundate,'YYYYMMDD'),6))+1)'} ..... EMP_ID)
What i'm trying to say is while defining your variables i.e. vRundate and vMaxdate, do not write a specific value like you have given which is 201401 and 201408. Instead give an expression which will take automatically the selected month or months into consideration and while doing it do not precede your variable expression with an '=' sign.