gmoney2594
Partner - Contributor II
2020-03-04
04:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count If
Hello,
I want to count and bucket information by the following parameters:
X = a number field
Count(if (x >= 0 and =< 30) = '1-30 days',
elseif (x >= 31 and =< 60) = '31-60 days',
elseif (x >= 61 and =< 90) = '61-90 days',
else (x >= 91) = 'Over 90 days')
How would I accomplish this in a bar chart
897 Views
1 Solution
Accepted Solutions
nikitadeshwal
Partner - Contributor III
2020-03-05
04:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a field 'Bucket' in script.
if(Points>=0 and Points<=30,'1-30 Days',If(Points>=31 and Points<=60,'31-60 Days',
if(Points>=61 and Points<=90,'61-90 Days',if(Points>=91,'Over 90 Days')))) as Bucket
In Bar chart,
take Dimension as Bucket and Measure as Count(Bucket )
if(Points>=0 and Points<=30,'1-30 Days',If(Points>=31 and Points<=60,'31-60 Days',
if(Points>=61 and Points<=90,'61-90 Days',if(Points>=91,'Over 90 Days')))) as Bucket
In Bar chart,
take Dimension as Bucket and Measure as Count(Bucket )
2 Replies
girish21595
Partner - Contributor III
2020-03-05
03:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the Class function to create the Bucket and use it as the dimension of Chart and measure as count(x).
864 Views
nikitadeshwal
Partner - Contributor III
2020-03-05
04:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a field 'Bucket' in script.
if(Points>=0 and Points<=30,'1-30 Days',If(Points>=31 and Points<=60,'31-60 Days',
if(Points>=61 and Points<=90,'61-90 Days',if(Points>=91,'Over 90 Days')))) as Bucket
In Bar chart,
take Dimension as Bucket and Measure as Count(Bucket )
if(Points>=0 and Points<=30,'1-30 Days',If(Points>=31 and Points<=60,'31-60 Days',
if(Points>=61 and Points<=90,'61-90 Days',if(Points>=91,'Over 90 Days')))) as Bucket
In Bar chart,
take Dimension as Bucket and Measure as Count(Bucket )