Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to select last 14 days data on basis of date dimension.
I am not doing this changes in data load editor, as I have other sheets in the project which uses entire data set.
I have put
only({<ORDER_DATE={">=$(=Today()-14)"}>}ORDER_DATE)
This is not working. Can you please let me know right way to do this.
Thanks,
Akanksha
Function Today() is not working inside SetAnalysis.
Just create a variable let vToday = Today(); in your script and use it in your measure.
only({<ORDER_DATE={">=num$(vToday)-14"}>}ORDER_DATE)
or
let vTodayMinus2W = num(Today()) - 14;
only({<ORDER_DATE={">=$(vTodayMinus2W)"}>}ORDER_DATE)
Not to mention, this is better for performance - the function will not be executed every time the chart will be updated...
Regards,
Vlad
Thanks Vlad for your reply!
But I am still getting invalid dimension after above changes too.
I have used below expression:
only({$<ORDER_DATE={$(=$(vTodayMinus2W))}>}ORDER_DATE)
I think you have too many $$ there
Try to use: only({<ORDER_DATE={">=$(vTodayMinus2W)"}>}ORDER_DATE)
Vlad