Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count on Date problem

Hi friends,

I am stuck in the issue when i need to count on date values, and i am getting 0 instead of correct numbers.

I have table like this

WeekAge
2/4/20150-30
2/4/20150-30
2/4/201531-60
2/4/201561-90
2/4/201590+
2/11/20150-30
2/11/201531-60
2/11/201531-60
2/11/201561-90
2/11/201590+
3/11/20150-30
3/11/201531-60
3/11/201561-90
3/11/201561-90
3/11/2015

90+

I need a pivot table like this

Age2/4/20152/11/20153/11/2015
0-30211
31-60121
61-90112
90+111

For this,

i was taking one dimension Age and conditions on expressions like

Count({<[Week] = {'2/4/2015'}>}[Week])


which is returning 0.

Can you please help me on this?

Regards,

Kuldeep

1 Solution

Accepted Solutions
awhitfield
Partner - Champion
Partner - Champion

Example attached

andy

View solution in original post

11 Replies
MK_QSL
MVP
MVP

Create a Pivot Table

Dimension

Age

Week

Expression

COUNT(Week)

Not applicable
Author

Hi,

Count(Week) gives

Agecount(Week)
0-304
31-604
61-904
90+3

But i want the count on individual dates

Regards,

Kuldeep

MK_QSL
MVP
MVP

You haven't added Week as 2nd Dimension in Pivot Table

Not applicable
Author

After adding the second dimension as week,

i get following result

Capture3.JPG

Not applicable
Author

Dates got changed to some different format here

Not applicable
Author

Hi,

You can keep like this.

In Dimension:

                    Age

                    Week

In Expression:

                COUNT(Week)

then,

You can keep hold the Week field and drag right side.Untitled.png

leave it.

Untitled1.png

MK_QSL
MVP
MVP

Kuldeep, the week format you are showing is different from what you have given in your question...

Not applicable
Author

Hi Krishnama,

Thanks for your reply.

I tried doing that but was not able to get the desired result.

Regards,

Kuldeep

Not applicable
Author

Hey

Thanks Manish. I was using the same format in both table and qlikview file.

I don't know why the format got change while loading the data in qlikview.

But for now i am good, as i changed the date source into text string. So it works fine.

Regards,

Kuldeep