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)
Display monthly group header even if there is no group data
GrafZahl
<p>Hi all,</p>
<p> </p>
<p>I have a table with a group header based on a date/time field and I am using "month" as an interval. I am summing up the number of rows and then display the monthly total next to the month.</p>
<p> </p>
<p>If there is no data row for a certain month then that month doesn't show up altogether. However I would like to display all months successively without gaps and then display a total of "zero" next to it. How to achieve?</p>
<p> </p>
<p>Thank you,</p>
<p>Michael</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
shir
<p>Hi,</p>
<p> </p>
<p>You can acheive this in your SQL ststement itself, try using join b/w your table and a datetime functions (months) to display zero data against months</p>
GrafZahl
<p>Hi Shir,</p>
<p> </p>
<p>Thanks for taking the time answering. Basically I only have the data set to work with, but cannot change the underlying SQL. Therefore I was hoping I could do it in the report layout...</p>
shir
<p>HI Michael,</p>
<p> </p>
<p>The below solution may not be the optimal way to achieve this, but this is what i presume that it could be done.</p>
<p> </p>
<p>> Create a data set (say Months); which displays only the months(either jan to feb) or from start date to end date. </p>
<p>> Create a "<em>New joint Data Set</em>" joining your existing data set and the above `Months` data set to create a Master data set to display data in the table</p>
GrafZahl
<p>Hi Shir,</p>
<p> </p>
<p>I thought this would be problematic as well, since my 2 data sets don't have the month as a piece of information but only a number of time stamps during the month, and the time stamps in both data sets are completely unrelated.</p>
<p> </p>
<p>However I think I found a way of having both original data sets amended with a column that specifies the month in each row, so I would be able to join them together based on that. I guess this is in line with your first suggestion above. I haven't put it in place yet but think that it should be working.</p>
<p> </p>
<p>Thanks for your input so far,</p>
<p>Michael</p>
shir
<p>Great !! , you can try that out.</p>
<p> </p>
<p>What my suggestion meant that you have ur existing data set, and the new data set you can create it out of the `sysdate` function which will display only the month or month-year, which ever is suitable.</p>
<p> </p>
<p>Now you could join the two data sets; joining the month from the second set and joining on your existing data set with the month or month-year. </p>
<p> </p>
<p>Hope i did not confuse u further
</p>
<p> </p>
<p>Please try out the solution and let us know if u face any issues.</p>
<p> </p>
<p>Thanks</p>
<p>Shir</p>