Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart with unique values on Dimension

Hello,

I have a line chart with Date as dimension and count Email address as expression.

The problem is that the chart shows all dates, instead of aggregating per date.

How can I show only unique values as dimension?

Capture9.PNG

Labels (1)
12 Replies
Chanty4u
MVP
MVP

hi,

Count or Count distinct?

= count(DISTINCT aggr(count( email),submtdate))

count( {<Column name={'Name'}>}Distinct Documnent2)

sunny_talwar
MVP
MVP

I think your date field might look like a date field, but may contain time information making it to repeat in the chart. I suggest fixing this within your script. You can do something like this:

LOAD SubmitDate as SubmitTimeStamp,

          Date(Floor(SubmitDate)) as SubmidDate

          ..

FROM Source

amayuresh
Creator III
Creator III

Please post your sample Data.

Do you have time in Date field ?

Anonymous
Not applicable
Author

may be this?

In Dimension Tab - > Update your Date Dimension with this -> Date(DateField)

sunny_talwar
MVP
MVP

Balraj that won't change a thing. You can do this instead -> Date(Floor(DateField)) to get rid of time portion

Anonymous
Not applicable
Author

Is floor() really required??

In some cases I extract date from Date/Time field using same

sunny_talwar
MVP
MVP

If you have a timestamp field and the goal is to extract just the date portion, I am almost certain that you cannot do it without using Floor function. Because without floor the date will look like a date, but it will still contain the decimals representing time portion.

Kushal_Chawda
MVP
MVP

try to do it in script like below

EmailCount:

load distinct SubmitDate,

                   SubmitDate as SubmitDateNew

                  Count(distinct Email) as EmailCount

resident your Data

group by SubmitDate;

Now Create the Chart,

Dimension:

SubmitDateNew


Expression:

Sum(EmailCount)



Digvijay_Singh
MVP
MVP

Good one