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

Count date

I have Date column named newdate.

p1.png

I want to create a new table which has two columns. a date column and count column which shows the count of each date.

For example 02/05/2016 will have count 1.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Change the load the table containing the date to:

     LOAD ...

          Date(Floor(newdate)) As newdate,

          Time(Frac(newdate)) As newtime,  // if you need the time part

          ...

This will prevent the timestamp problem explained by Gysbert.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

13 Replies
Chanty4u
MVP
MVP

create a stright table

with newdate dimension and add

expression as  count(distinct(newdate))

Gysbert_Wassenaar

Add a measure as second column. count(newdate) should work if newdate is not a key field linking two tables. Otherwise count another non-key field.


talk is cheap, supply exceeds demand
HirisH_V7
Master
Master

Hi ,

Is this,

Date RowNo().PNG

HirisH
“Aspire to Inspire before we Expire!”
Not applicable
Author

You can create a table:

dimension: newdate

expression: count(newdate)

Or create a list, showing frequency.

mithilesh17
Partner - Creator II
Partner - Creator II

Hi,

why you need another table???

simply use newdate as dimension and count(newdate) as expression on front-end in straight table.

Regards,

Not applicable
Author

newtab:

Load

        (newdate) as Dateee, 

        count([distinct] newdate) as c

RESIDENT root;

Is this right? It gives this error

The following error occurred:

Error in expression: ')' expected

Not applicable
Author

Hi,

How to do that? can you give me the script for it.

Not applicable
Author

1.png

even if first date is twice it is not showing as one. it is showing two different entries.

Not applicable
Author

1.png

It does not work. It gives frequency of every date as 1. where as we can see that the first date itself is repeated. It should have been clubbed and shown as frequency 2.