Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
not able to write expression for last 30 days in bar chart, i want that, on first look data come for last 30 days and then on every selection of months its show last 30 days of one months data....
see attachment for details
Can you please explain your requirements in detail?
try
round(today() - date(STEP_START_TIME,'DD/MM/YYYY'),1) as expression.
Hi,
You have a start time, with this kind of format : 9/28/2013 8:13:57 PM
You can get a date like this, for example: date(date#(SubField(STEP_START_TIME,' ',1),'M/D/YYYY'))
Then you get the number of days between this date and today like this:
Today()-date(date#(SubField(STEP_START_TIME,' ',1),'M/D/YYYY'))
Hope this helps
You could try
not able to write expression for last 30 days in bar chart, i want that, on first look data come for last 30 days and then on every selection of months its show last 30 days of one months data....
see attachment for details
Can you please explain your requirements in detail?
Write a load script like
LOAD APPLICATION_NAME,
HOST_NAME,
STEP_NAME,
SCRIPT_NAME,
STEP_NUM,
STEP_START_TIME,
MONTH,
TOTAL_STEPS,
STATUS,
Duration,
Today() - Date(Date#(SUBFIELD(STEP_START_TIME,' ',1),'M/D/YYYY')) as STEP_START_TIME_New //For difference
FROM
C:\Users\admin\Desktop\TESTB.xlsx
(ooxml, embedded labels, table is Sheet1);
Regards
In your sample data no STEP_START_TIME is under 30 days from today, so if you try to make a count for the last 30 days you get nothing. Otherwise, to make a count like in the SIMPLE COUNT chart but for last 30 days only, this works:
count({<STEP_START_TIME={"=date(date#(SubField(STEP_START_TIME,' ',1),'M/D/YYYY'))>Today()-30"}>}Duration)
Then, when you select MONTH, you only get 1 result each time. This is because your MONTH field is a date in monthname format, entries are written the same if dates are same month, but each cover a different date.
MONTH is loaded this way: Date(STEP_START_TIME,'MMMM') AS MONTH,
Load it this way instead: Text(Date(STEP_START_TIME,'MMMM')) AS MONTH,