Skip to main content
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

12 Replies
Chanty4u
MVP
MVP

hi,

Count or Count distinct?

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

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

sunny_talwar

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

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

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

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

Good one