Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to use the method below to limit the range of number in chart expression, but it can‘t limit the range of number successfully.
This is my test data:
Hi @HelloHMC
There you go!
1. when you did date() on Today()-30 bracket was in wrong place so you still would get number result. please note that making Max() and other numerical operations changes mas from date back to number!
2. when you did <= you missed date() functions
3. The above assumptions are based on the fact that i think your DATE_WORK field was formatted as default date based on variables from beginning of the script!
count( {$<DATE_WORK={">=$(=date(max(DATE_WORK)-30))<=$(=date(max(DATE_WORK)))"},WORK_STATE={'Y'}>} [Employee ID]) /
count( {$<DATE_WORK={">=$(=date(max(DATE_WORK)-30))<=$(=date(max(DATE_WORK)))"}>} [Employee ID])
do you see the difference?
cheers
Lech
I have find what is the problem, thank you all~
There are some blanks within the chart expression, so the correct one is as below:
count( {$<DATE_WORK={">=$(=date(max(DATE_WORK)-30))<=$(=max(DATE_WORK))"},WORK_STATE={'Y'}>} [Employee ID])/
count( {$<DATE_WORK={">=$(=date(max(DATE_WORK)-30))<=$(=max(DATE_WORK))"}>} [Employee ID])
The wrong one is as below:
count({$<DATE_WORK={">=$(=date(max(DATE_WORK)-30)) <= $(=max(DATE_WORK))"}, WORK_STATE={'Y'}>}[Employee ID]) /
count({$<DATE_WORK={">=$(=date(max(DATE_WORK)-30)) <= $(=max(DATE_WORK))"}>}[Employee ID])
If you are interested in the detail, you can compare two chart expression to find what is the exact problem~
BR!