Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
random_user_3869
Partner - Creator III
Partner - Creator III

error graph vizualisation dimension

Hello everyone,

 

I have an issue with this figure :

error dimension date instead of year.PNG

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

normal date format for DIMnormal date format for DIM

SO i really don't understand how the issue appeared and how to solve it.

Anyone could help ?

Thanks a lot

Labels (2)
2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you share the screenshot of the dimension property. Also if possible please share the qvw file.

 

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
random_user_3869
Partner - Creator III
Partner - Creator III
Author

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

dimension properties.PNG

 

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