Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have an issue with this figure :
the dimension is a DATE FIELD named DSTAMP and it is formatted this way: DD/MM/YYYY but i get year as dimension for all the values of the figure. SO i want DD/MM/YYYY instead of YYYY
WHen i convert this graph into a straight table i get the standard date format
SO i really don't understand how the issue appeared and how to solve it.
Anyone could help ?
Thanks a lot
Can you share the screenshot of the dimension property. Also if possible please share the qvw file.
I'm on qlikview april 2019 SR3
Version 12.40.203000.0
In that version i really don't see where i can edit the dimension
It used to work two month ago and something occured.
THe main table is linked to a calendar table.
And the code is the following:
SET vL.DateFieldLinkName = 'DSTAMP_DATE';
SET vL.CalendarTableName = '$(vL.DateFieldLinkName) Calendar';
MinMaxDate:
LOAD
Min(DateFieldValues) as MinDate,
Max(DateFieldValues) as MaxDate;
LOAD
(FieldValue('$(vL.DateFieldLinkName)',RecNo())) as DateFieldValues
AutoGenerate(FieldValueCount('$(vL.DateFieldLinkName)'));
LET vL.CalendarMinDate = Num(Date(Peek('MinDate',0,'MinMaxDate'),'$(DateFormat)'));
LET vL.CalendarMaxDate = Num(Date(Peek('MaxDate',0,'MinMaxDate'),'$(DateFormat)'));
LET vL.CalendarToday = Num(Today());
DROP Table MinMaxDate;
// Calendar generation
[$(vL.CalendarTableName)]:
LOAD
Date([$(vL.DateFieldLinkName)],'DD/MM/YYYY') as [$(vL.DateFieldLinkName)],
Year([$(vL.DateFieldLinkName)]) as [$(vL.DateFieldLinkName) Year],
Dual('Q' & Ceil(Month([$(vL.DateFieldLinkName)]) / 3),QuarterStart([$(vL.DateFieldLinkName)])) as [$(vL.DateFieldLinkName) Quarter],
Month([$(vL.DateFieldLinkName)]) as [$(vL.DateFieldLinkName) Month],
Week([$(vL.DateFieldLinkName)]) as [$(vL.DateFieldLinkName) Week],
Day([$(vL.DateFieldLinkName)]) as [$(vL.DateFieldLinkName) Day],
WeekDay([$(vL.DateFieldLinkName)]) as [$(vL.DateFieldLinkName) WeekDay],
Dual(Year([$(vL.DateFieldLinkName)]) & '-' & 'Q' & Ceil(Month([$(vL.DateFieldLinkName)]) / 3),QuarterStart([$(vL.DateFieldLinkName)])) as [$(vL.DateFieldLinkName) YearQuarter],
Date(MonthStart([$(vL.DateFieldLinkName)]), 'YYYY-MM') as [$(vL.DateFieldLinkName) YearMonth],
Dual(Year([$(vL.DateFieldLinkName)]) & '-' & Week([$(vL.DateFieldLinkName)]),WeekStart([$(vL.DateFieldLinkName)])) as [$(vL.DateFieldLinkName) YearWeek],
If(YearToDate([$(vL.DateFieldLinkName)], 0, 1, $(vL.CalendarToday)), 1, 0) as [$(vL.CalendarTableName) YTD Flag],
If(YearToDate([$(vL.DateFieldLinkName)], -1, 1, $(vL.CalendarToday)), 1, 0) as [$(vL.CalendarTableName) PYTD Flag],
If(Month([$(vL.DateFieldLinkName)]) = Month($(vL.CalendarToday)), 1, 0) as [$(vL.DateFieldLinkName) CurrentMonth Flag],
If(Month(AddMonths([$(vL.DateFieldLinkName)],1)) = Month($(vL.CalendarToday)), 1, 0) as [$(vL.DateFieldLinkName) LastMonth Flag];
LOAD
Date($(vL.CalendarMinDate) + RecNo() - 1) as [$(vL.DateFieldLinkName)]
AUTOGENERATE ($(vL.CalendarToday) - $(vL.CalendarMinDate) + 1);
Is anyone could help me with that it would be great.
Thank you