Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Tags (1)
12 Replies
Chanty4u
Esteemed Contributor III

Re: Chart with unique values on Dimension

hi,

Count or Count distinct?

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

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

Re: Chart with unique values on Dimension

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
Contributor III

Re: Chart with unique values on Dimension

Please post your sample Data.

Do you have time in Date field ?

balrajahlawat
Esteemed Contributor

Re: Chart with unique values on Dimension

may be this?

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

Re: Chart with unique values on Dimension

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

balrajahlawat
Esteemed Contributor

Re: Chart with unique values on Dimension

Is floor() really required??

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

Re: Chart with unique values on Dimension

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.

Re: Chart with unique values on Dimension

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
Honored Contributor III

Re: Chart with unique values on Dimension

Good one