Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
computed columns based on expression builder.
thelcd
<p>Hi,</p><p> </p><p>I've got a report where I'm asking users to enter a month of year, and a search variable.</p><p> </p><p> </p><p> </p><p>However, I would like to create N columns where N is the number of days in the month and populate it with a count of number of occurances on the day (1-30 for example) of that month.</p><p> </p><p>I can calculate the number of days in the month in a birt variable and have the month and month+1 variables also.</p><p> </p><p>So how can I create a report to query the Result of my data set and perform a count on a date field?</p><p>I don't think it would require N selects!!? </p><p> </p><p>Thanks for any suggestions on how to go here...</p><p> </p>
Find more posts tagged with
Comments
kclark
<p>If the customer selects a month, November, and then selects something to search by, "AAA" you would like to count how many times "AAA" is in November, correct?</p><p> </p><p>I think the SQL would look something like</p><pre class="_prettyXprint">select count(customernumber) as customer_countfrom paymentswhere YEAR(paymentdate) = ? and MONTH(paymentdate) = ?</pre>
Hans_vd
<p>I think what you want is to have a report that has the days of the month, next to one another. A column for each day, is that it?</p><p> </p><p>You can create a crosstab for this. It's really easy:</p><p>First you create a data cube</p><p>when you drag a date field to the dimensions area, you can immediately select "day of month"</p><p>Then drag the datacube to the report layout and a crosstab will be created showing all the days of the month next to one another.</p><p> </p><p>From another post of yours, I see that you tried solving this problem in the query, but in my opinion this is a better solution.</p><p> </p><p>Hope it helps</p>