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

Date Field filtering from a list of fields

Hi,

Need a help to pull only the fields which has dates in,

for eg., $(Fields) will give the list of fields present in that QV or table. I need to find the fields at a time which has only dates(any format).

7 Replies
micheledenardi
Specialist II
Specialist II

There are no data types in QlikView Data Types in QlikView.

There are different presentation of the numeric data, that's it.  But you can't even say that a given column is a numeric or a text, because both numeric and string values can be in the same column in QlikView.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
vishsaggi
Champion III
Champion III

Can you share some sample date values you are getting from your source?

pipuindia99
Creator III
Creator III
Author

Hi,

Attached a screenshot, if you see in that whichever field has date values should be listed out in separate list box

for eg., in the screenshot changegroup_created is a field which has date values, similarly there would be different fields which has date values, i need to identify which are those fields and have to list it out separately.

ahaahaaha
Partner - Master
Partner - Master

Hi,

Maybe this discussion will help you  how to get values for $Field

Regards,

Andrey

pipuindia99
Creator III
Creator III
Author

Hi,

I read the discussion, not sure it helps me...

vamsee
Specialist
Specialist

The best suggestion I would give is

     First 100 Load

    

Create a table box with all columns and filter out

juliedecoene
Partner - Contributor III
Partner - Contributor III

Hi,

Here is an example for numeric fields, that you would need to adapt for dates. Unfortunately, I believe the "any format" for dates may be difficult to catch; you will have to come up with a very smart rule to test that out...

NumFields:

LOAD * Inline [NumField];

FOR i = 0 to NoOfTables()-1

  vTable = TableName($(i));

  FOR j = 1 to NoOfFields('$(vTable)')

  vField = FieldName($(j),'$(vTable)');

  temp:

  NoConcatenate

  LOAD

  Sum(If(IsNum([$(vField)]),1,0)) as FieldIsNum

  Resident $(vTable);

  vFieldIsNum=Peek('FieldIsNum', 0, 'temp');

  If vFieldIsNum = NoOfRows('$(vTable)') then

  Concatenate(NumFields)

  LOAD

  '$(vField)' as NumField

  AutoGenerate(1);

  ENDIF

  DROP Table temp;

  NEXT j

NEXT i