Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am looking for some help on restricting a chart to display the recent 12 month's data. Testing data is attached. and set expressions are pasted below:
Dimension:
BU
Boiler
Expressions:
Sum({<YearMonth = {">=$(=Date(addmonths(Today(), -12), 'MMM YYYY')) <=$(=Date(addmonths(Today(), 0), 'MMM YYYY'))"} >} Hours)
I did not receive any error, neither data.
Thank you in advance for your time and effort
Beth
I think the problem might be that your YearMonth field is not read as a date field... I get this
When I use this script
Table:
LOAD BU,
Boiler,
Hours,
Date(Date#(MonthYear, 'MMM YYYY'), 'MMM YYYY') as MonthYear,
Date(Date#(YearMonth, 'MMM YYYY'), 'MMM YYYY') as YearMonth
FROM
[..\..\Downloads\TestingData.xls]
(biff, embedded labels, table is Sheet1$);
I think the problem might be that your YearMonth field is not read as a date field... I get this
When I use this script
Table:
LOAD BU,
Boiler,
Hours,
Date(Date#(MonthYear, 'MMM YYYY'), 'MMM YYYY') as MonthYear,
Date(Date#(YearMonth, 'MMM YYYY'), 'MMM YYYY') as YearMonth
FROM
[..\..\Downloads\TestingData.xls]
(biff, embedded labels, table is Sheet1$);
Thank you for your reply.
YearMonth could be an issue, but if i change my expression and let
YearMonth = {"$(=Date(addmonths(Today(), -12), 'MMM YYYY'))
it works fine.
Because for a single month you are able to compare the text to text... but for a range, you cannot compare text to a range... for that you need to compare a number to a range.
Thank you for your time and effort, it helps!
No problem at all. If you got what you wanted, please close the thread down.
Qlik Community Tip: Marking Replies as Correct or Helpful
Best,
Sunny