Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
wiz_nerd
Creator
Creator

Set analysis or calculated field consisting STRING field with respect to DATE

 

I am Trying to create a dimension using these fields. But i just want data for latest "n" dates.

I want to used the Table  field name on x axis with respect to last three dates per field. 

 

Dates in RFC3339  format.

Table1_Field_NAMETable2_Field_DATE
  
FIELD_A_01.1904_DB012019-01-11T03:08:07+01:00
FIELD_A_01.1904_DB032019-01-13T03:06:03+01:00
FIELD_A_01.1904_DB042019-01-14T03:09:21+01:00
FIELD_A_01.1904_DB062019-01-16T03:08:57+01:00
FIELD_A_01.1904_DB072019-01-17T03:12:40+01:00
FIELD_A_01.1905_DB012019-01-18T03:12:56+01:00
  
FIELD_B_01.1904_DB012019-01-11T03:08:07+01:00
FIELD_B_01.1904_DB032019-01-13T03:06:03+01:00
FIELD_B_01.1904_DB042019-01-14T03:09:21+01:00
FIELD_B_01.1904_DB062019-01-16T03:08:57+01:00
FIELD_B_01.1904_DB072019-01-17T03:12:40+01:00
FIELD_B_01.1905_DB012019-01-18T03:12:56+01:00

 

WhatsApp Image 2019-01-22 at 8.01.13 PM.jpeg

Labels (3)
3 Replies
uacg0009
Partner - Specialist
Partner - Specialist

Hi,

I think below is what you want:

I think firstly you need to create a new column for group by, for example,

left(Table1_Field_NAME,10) as new_column

and then in your chart, use below expression to be dimension:

=aggr(if(rank(left(Table2_Field_DATE,10)) < 4,Table1_Field_NAME),new_column,Table2_Field_DATE)

And suppress the null value, then you can get the top 3 NAME value based on DATE like below screenshot

Set analysis or calculated field consisting STRING field with respect to DATE.PNG

Aiolos Zhao

wiz_nerd
Creator
Creator
Author

Thanks Aiolos Zhao for your valuable response.

 

I have these doubts.

Well why did you use group_by here well and also i didn't understand the reason of using 10 ??

The issue is i cant modify the load script I do not have write access  and these values are already dependent on each other so can we modify it somehow to get the desired result without changing the load script.

wiz_nerd
Creator
Creator
Author

Hi Aiolos,
I have edited the question with more information and explanation since you have tried to help me and spend your valuable time I want you to look at the edited question if you want to look. This is the link to it.
https://community.qlik.com/t5/QlikView-App-Development/Creating-Dimension-with-respect-to-date-value...