Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How calculate number of days

How to calculate number of days in a selection ?

In the following example , the number of days is 54?

Sans titre.png

1 Solution

Accepted Solutions
Colin-Albert

If your data has a Date field associated with Year, Month & Day,

try

     count(distinct Date)

This may or may not work depending on your data model.

View solution in original post

8 Replies
Colin-Albert

If your data has a Date field associated with Year, Month & Day,

try

     count(distinct Date)

This may or may not work depending on your data model.

avinashelite

if you have the all the data in field than you could use count(filedname)...

can please share the sample data so that it will be helpful for us understand the data

alexandros17
Partner - Champion III
Partner - Champion III

go in menu: Setting -> user preferences -> Tab "general" then in the box "Max Values in current selection" write a value (Ex. 50) end see what happen

Let me know

t_chetirbok
Creator III
Creator III

Hello

Use GetSelectedCount(Day)

Colin-Albert

GetsSelectedCount(Day) will not work as Day is the Day of the Month and only has 31 unique values, so will not give the count of days across multiple months.

sfatoux72
Partner - Specialist
Partner - Specialist

Count(Day)

t_chetirbok
Creator III
Creator III

Can to use GetPossibleCount function

Colin-Albert

Counting the Date field gives the correct answer, you earlier expression used the Day field which does not give the correct answer.