Crystal XI - Can you split or filter a single datasource to create multiple charts? - crystal-reports

I have a dataset which has a daily count spanning over several months and I want to create a graph showing the daily counts however I want to have a separate chart for each month. Is this possible to do by isolating each month?
For example if I have
2009/1/1 45
2009/1/2 21
2009/1/3 11
2009/1/4 11
2009/2/1 34
2009/2/2 45
2009/2/3 11
2009/2/4 34
Chart A would filter the dataset so only January's data would be displayed
Chart B would filter the dataset so only Febuary's data would be displayed

Using Chart Expert click the 'Order...' button and set Chart Sort Order to 'specified order' then define the month you want to see. A new tab will appear called 'Others'. Click it and check 'Discard all others'. The chart now only should display data for the specified period.

Related

Compute rolling average across years while displaying data split by year

The dashboard in the linked workbook shows a table with sales split by year on the top. Below, there's a table with the rolling average of the last 4 weeks, including the current. It's set to show NULL if there are not enough data points. I'd like for it to compute the first January 2018 value based on the current week and 3 full weeks from the end of 2017. Carrying that concept forward, all NULLs from 2018 onward will be eliminated. The NULLs for the first 5 weeks of 2017 will be the only NULL values. The average should always be computed on a full 4 weeks (28 days) even when week 53 doesn't contain 7 days.
How can I write a calculation to achieve what's described above?
I've tried putting the WINDOW_AVG function inside a LOD, but that's not allowed. Furthermore, I've also tried using FIXED and even FIXED inside WINDOW_AVG.
Here's one of my attempts:
{FIXED [Week_int]:
WINDOW_AVG(SUM([Sales]), -4, 0)
}
It returns this error: "Error: Level of detail expressions cannot contain table calculations or the ATTR function"
Here's the data structure. It includes one value of Sales per day.
Basically I created a dummy data in Excel by creating dates (from 1-1-2017 to 2-2-2021) and filling some random values (unif dist *5000) against these.
I added Week[date] to columns and year[date] to rows as in your screenshot. I added sum(value) on the text marks card.
Thereafter, I added table calculation --> Moving average --> edited it for previous 4 values , next 0 values, (check current value if you want to include current record), then check Null if there are not enough values. (your requirement). --> click compute using -Specific Dimensions change the order of fields below - drag Year above than week (table across then down will also create the same view)
You should be able to get a view as desired.
Regarding your query on number of days in the week, Tableau caters it automatically if you have chosen it datepart.
Edit I verified this in Excel, the method is correctly working.
See, the average of first 28 values in Excel
and the view built in tableau:
Here's the corrected dashboard hosted on Tableau Public.

Jaspersoft studio multiple chart with single query

My database query fetches list of data like:
id key noc date
1 abc 4 1-10-2016
2 abc 12 2-10-2016
3 abc 23 3-10-2016
4 abc 2 4-10-2016
5 def 23 1-10-2016
6 def 44 2-10-2016
7 def 12 3-10-2016
9 def 43 4-10-2016
10 def 43 5-10-2016
abc and def made those no of calls on those dates.
I want to display these data in chart.
But I am fetching this data with a single query, and I want to create 2 charts , one for abc and another for def.
How can I create multiple charts in jaspersoft with single query and making a single chart? As the number of persons making the call can be different , and I will have to create a chart for every person.
When creating or modifying each chart you just need to link them back to the relevant dataset. This can be either the main report dataset or a sub-dataset created just to run the charts.
You only need to follow the instructions on the relevant jaspersoft wiki page and link each new chart back to the required dataset.
Regards,
For getting multiple charts from a single query you need to do :
First create a jasper report, and add a subreport to it. ( Make sure to make the layout growable and the width of the main group should be larger than the subgroup)
Create the dataset
Create Group on right clicking the report from outline panel.
Provide a group name by selecting a column.
Add a expression pointing the column which is grouping the data.
And select reset on group .
Don't forget to set the evaluation time and the evaluation group
For example :
<chart evaluationTime="Group" evaluationGroup="KeywordGroup">

Date measures with a common scale/dimension

I am trying to create a side-by-side bar chart where one set of bars is a count of open tickets by each week and the other set is the count of closed tickets by each week. The fields are all in a flat table.
For example, if 17 tickets were opened during week 2 (week beginning Sunday, 1/03/2016) and 14 were closed that same week (regardless of when they were created), I'd like to graph those on the same bar chart.
I am using the Week(Opened) function for the dimension of the first set and Week(Closed) as the dimension of the 2nd set. These work fine on separate bar charts. However, there is no common dimension whereby I can put them on the same chart.
I'd like to add a line to the chart as depicted in the 1st screen shot. This line is on a third scale/dimension.
I have tried a Master Calendar but my results are erroneous possibly due to the fact I have two date dimensions.
Sample Bar Chart with line added
Sample data screen capture
You will need to create a canonical date field - the full details can be found here.
https://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date
Essentially you generate a single calendar table from the two date fields and then use the new date generated in your charts.

Charts drill down as 'year to months for different cities' in Tableau

I'm working on Tableau for rainfall data.
I have a cumulative rainfall data for a year (and the months respectively) of different cities.
And I prepared a tableau barchart for the annual rainfall data.
So, if I hover/click my cursor on any of the bar then a line chart which carries the months of that particular city need to be visualized.
Please suggest.
You have to using compulsory Action Filter.
choose dashboard menu -> Action->add action.
Create another worksheet with the line chart month view you would like to see.
Then go to Worksheet>Actions>
Add Action > Filter and Select how you want it to run (hover/select)
Select your new worksheet as the target sheet
Target filters on the year which displays the months you want in the new view
You might need to mess around with these setting to get it how you want exactly but an action is the way to go.

SSRS 2008 R2 - Add total line to chart

I have created a line chart that displays the different types of messages sent over a month (Email, Print, Voice) which are displaying on the chart just fine.Is there an easy way to add another line which totals the values for the 3 series without changing the SQL?
There are two way to do this in reporting services:
1. Directly in the chart
Add a new series to your line chart. Set the expression for the value to be
=Fields!Email.Value + Fields!Print.Value + Fields!Voice.Value
2. With a calculated field in the dataset
Set the calculated field "AllMessages" to be the sum of Email, Print and Voice. Then add AllMessages to your chart. Youtube Walkthrough calculated field