Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

help4qv123
Contributor II

Fetch only Date

Hi,

'I have a database in which one of the column has dates and some duplicate values or records in it. i need to show only count(date).

plz check the  attachmnt

Tags (1)
1 Solution

Accepted Solutions
Partner
Partner

Re: Fetch only Date

Find the attachment hope it will helps you

View solution in original post

12 Replies
vardhancse
Valued Contributor III

Re: Fetch only Date

Hi,

in order to get date/month.year from a field is possible using

Date(Floor())

month()

Year()

functions.

balkumarchandel
Valued Contributor II

Re: Fetch only Date

Here you have many problems :

1. It is not recommended to have junk data ('dddd','NA')in source itself (Need to talk your source team to clean the data )

2. Your column is not in date format in excel itself.

Solution :

if you know the junk values you can use if statement and filter the data

like

if (match(Date,'dddd','asd','N/A','etc')=0,' ',date) as CorrectDate

thanks

BKC

help4qv123
Contributor II

Re: Fetch only Date

in database its in date format. can we solve if it is in date format.

Re: Fetch only Date

Hi,

If it contain only date then use

count(DISTINCT Date)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
help4qv123
Contributor II

Re: Fetch only Date

It doesn't work. it contain date with some other values like alphabetic, numeric...etc...i need the count of only dates.

Re: Fetch only Date

Hi,

Then you have to create flag in script which identify which is proper date and which is not date.

and use that flag in your set analysis.

like count({<Flag-={"Not Date"}>}DISTINCT Date)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Not applicable

Re: Fetch only Date

You can use

Count(DISTINCT FieldName)

Highlighted
anbu1984
Honored Contributor III

Re: Fetch only Date

Script

LOAD Date#(@1,'DD-MMM-YYYY') As Date,

     @2

FROM

sampl.xls

(biff, no labels, table is Sheet1$);

Try this expr in Text box

=Count(If(IsNum( Date),1))

Partner
Partner

Re: Fetch only Date

Find the attachment hope it will helps you

View solution in original post