Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I would like some help with this please:
I am in Chart properties - It is a line chart - works beautifully when I have:the dimension
=date(AppointmentDate, 'www dd/MM/yyyy')
But
as part of a dashboard I would like to amek the same chart just show a week of data, starting 7 days before today.
The expression below in the Enable conditional box does not work.
date(AppointmentDate) >= date(today()-3)
Thank you
Jo Tedesco
Thank you both
I have used this formula:
=if(AppointmentDate>= date(weekstart(today()-3)),date(AppointmentDate))
I placed it in the
chart properties
Dimensions
Edit - Used Dimensions.
I would have liked to use it in the set analysis but too complicated - I might try later.
Thank you again
Jo
Try to use same in expression as set analysis..
How do I write it in the expression using set analysis? I am unsure how to use quotes etc.
date(AppointmentDate) >= date(weekstart(today()))
sum({< AppointmentStatus = {'Completed'}>}sales
Where you want to include this date? What is your actual date format of your AppointmentDate field.
May be like
= Sum(({< AppointmentStatus = {'Completed'} , AppointmentDate = {">= $(Date(WeekStart(Today() -7)))"} >} sales)
Left hand part you can't use calculations. I would prefer in script like
Date(AppointmentDate) as AppointmentDate // Or may be name changed
Then, Set analysis should be
sum({< AppointmentStatus = {'Completed'}, AppointmentDate = {"=AppointmentDate >= date(weekstart(today()))"}>} sales)
To make more clear, You can do like below as well
If(date(AppointmentDate) >= date(weekstart(today())), 1,0) as Flag
Then analysis should be
sum({< AppointmentStatus = {'Completed'}, Flag = {1}>}sales)
Thank you both
I have used this formula:
=if(AppointmentDate>= date(weekstart(today()-3)),date(AppointmentDate))
I placed it in the
chart properties
Dimensions
Edit - Used Dimensions.
I would have liked to use it in the set analysis but too complicated - I might try later.
Thank you again
Jo
To make more clear, You can do like below as well
Where do you put this? Loading script or in the expression?
If(date(AppointmentDate) >= date(weekstart(today())), 1,0) as Flag
In fact, I don't like to use calculated dimensions until unless needed and it kills the performance. If you read optimize document from community there you will will get front end optimize tips and first initiate point is the same "Don't use Calculated dimensions"
Script
Sorry Anil – I am not sure what has happened – I meant to mark your answer as correct, but I hit the wrong button! Too much multi tasking. Will you be able to change it? Or give me instructions how I can change it?
Jo