SSRS 2008 Charts: Selective Filtering on Charts within a chart - ssrs-2008

I have 3 Chart Series A,B,C of Data on single Chart
Normally When I apply filter on single series,the filter takes affect on all 3 series A,B,C .What I need is someway to apply particular filter on Series A,B but not C
like i have billable status as billable, non billable and partial billable.
i want two columns in the chart. 1 depicting only non billable employees and 1 showing the total of all billable status i.e., the whole team size.
my category axis has month.
i am not able to apply selective filters for one column of the two that i require.
please help.

You wont be able to do what you want, because each series/category is a subset of your dataset, meaning that if you group by "all" then all elements of your data set will fall into that category.
The best way to achieve what you want is on the query that creates the dataset do a Union with the total of employees, something like:
SELECT 1 as NumberEmployees, SSN, BillableStatus FROM mytable
UNION
SELECT COUNT(*), 0 as SSN, -1 as BillableStatus FROM mytable
Then when you'll have a status -1 that corresponds to all employees, and will appear on the chart as a different bar

Related

sum by groups in KDB

I have a PnL table with 3 columns. date, region, product.
I'm trying to group all PnL rows by region and product. One way that i've tried is to sum by region and product as following
select PnL : sum(PnL) by region, product from table where date within (d1;d2)
The issue I have is unexpected results. For a given date range (d1;d2) I'm getting the results I'm expecting. However for date range (d1;d2+1) I'm getting 0 everywhere.
I checked the data availability on the d2+1 and data is already available on that day.
Please note that the server is stateless and it is not possible to use intermediate results in variables.
What is the best way to achieve a grouping sum in KDB?

How to filter one source by clicking and filtering a bar chart from another source in Tableau?

I used an Apriori algorithm to view the frequent relationships in the dataset and I want to do a dashboard to better visualize this data but I don't know how to do this filter.
This is the bar chart that I created to show the support (amount of times something happend) and the confidence (probability of B happening given A) of these associations:
Apriori Chart
Next to it on the dashboard, I'll have a table with the full dataset used in this Apriori analysis where I have more information such as ID, Income, Hours Worked, etc:
Table from different data source
How can I create this relationship? The two data sources don't have a column in common that I can use for that.
I would need some way to:
Split the values in the antecedents columns by comma and filter only those columns with value equal to 1 in the other dataset
**Dataset A**
'Age Range <=30, Joblevel 1, Maritalstatus Single'
->
'Age Range <=30'
'Joblevel 1'
'Maritalstatus Single'
**Dataset B**
'Age Range <=30' == 1
'Joblevel 1' == 1
'Maritalstatus Single' == 1
Clicking this would filter the table next to it
Is there any way I can do this in Tableau?
You can download the tbwx i used in this example here https://community.tableau.com/servlet/JiveServlet/download/1083124-384949/Apriori.twbx
Thanks in advance for the help!
I am not able to check your twbx on the machine I'm using but I think you should be able to do this. The fields in the 2 data sources need to match so manipulate the data sources the make this happen.
For data source 1 there's a function SPLIT which will mean you are able to split the comma separated string to 3 fields.
Putting those 3 fields to the Detail shelf of your bar chart (or even Rows and hiding the header) will mean you can use them in an action filter.
Your second data source is a cross tab - post pivot. You should be able to pivot this data source. Highlight the measures and pivot them. This will give you the field Pivot Field Names and Pivot Field Values.
You only want to keep those with a value of 1 so create a calculated field
[Lookup1]: IF [Pivot Field Values] = 1 THEN [Pivot Field Names] END
Duplicate this field twice so you have Lookup1, Lookup2 and Lookup 3.
Then you should be able to action filter the table.
In the action filter set it up so SplitField1 = Lookup1, SplitField2 = Lookup2, etc.
Fingers crossed this works, I haven't been able to test so I am pulling it out of my head.

Excluding values from a grand total in Spotfire cross table

I am trying to create a Spotfire cross table that would behave similarly to the Excel in the below screenshot.
I would like to be able to include a list of expenses, but for the "fees", I want the "fees" and all of the itemized fees below it to only be included in the grand total once. Using the attached example, I want the $385 from the "Fees" line item to be included in the grand total and the underlying fees should be listed out with their amounts, but I don't want the underlying fees to be double-counted in the grand total.
Up to this point, I have only been able to create a cross table where the "Fees" item and the underlying fees are all summed up in the grand total, which is not what I want.
I tried to illustrate the point I'm trying to make in the attached screenshot. I want the cross table in Spotfire to calculate like the example on the left, but all I've gotten so far is something similar to the example on the right.
Is there a way to do this in Spotfire?
ExampleOfExpensesForSpotfire
Spotfire subtotals and grand totals are based on the underlying data. There isn't a way to customize or exclude them in their native form--that is to say, without limiting the data. Here is a similar post on this:
https://stackoverflow.com/a/40087286/6167855
One way to sort of achieve what you are wanting to do is nest your Fees as a calculated column and place this on your horizontal axis. For example, insert this calculated column:
case
when [AREAS_OF_SPEND] = 'Insurance' then 1
when [AREAS_OF_SPEND] = 'Garbage Collection' then 1
when [AREAS_OF_SPEND] = 'Recycling' then 1
when [AREAS_OF_SPEND] = 'Taxes' then 1
when [AREAS_OF_SPEND] = 'Water' then 1
when [AREAS_OF_SPEND] = 'Gas' then 1
when [AREAS_OF_SPEND] = 'Electric' then 1
else 0
end as [IsFee]
Now add it as a horizontal column on your cross table. You will see this:

Pivot Charts in google Sheets by counting non-numeric data?

I have a dataset that I'd like to summarize in chart form. There are about 30 categories whose counts I'd like to display in a bar chart from about 300+ responses. I think a pivot table is probably the best way to do this, but when I create a pivot table and select multiple columns, each new column added gets entered as a sub-set of a previous column. My data looks something like the following
ID Country Age thingA thingB thingC thingD thingE thingF
1 US 5-9 thB thD thF
2 FI 5-9 thA thF
3 GA 5-9 thA thF
4 US 10-14 thC
5 US 10-14 thB thF
6 US 15-18
7 BR 5-9 thA
8 US 15-18 thD thF
9 FI 10-14 thA
So, I'd like to be able to create an interactive chart that showed the counts of "thing" items; I'd then like to be able to filter based upon demographic data (e.g., Country, Age). Notice that the data is non-numeric, so I have to use a CountA to see how many there are in each category.
Is there a simple way to display chart data that summarizes the counts and will allow me to filter based on different criteria?
The query can summarize the data in the form you want. The fact that you have "thA", "thB", etc, instead of "1" complicates the matter, but one can transform the strings to numeric data on the fly.
Assuming the data you've shown is in the cells A1:I10, the following formula will summarize it:
=query({B2:C10, arrayformula(if(len(D2:I10), 1, 0))}, "select Col1, Col2, count(Col3), sum(Col3), sum(Col4), sum(Col5), sum(Col6), sum(Col7) group by Col1, Col2", 0)
Explanation:
{B2:C10, arrayformula(if(len(D2:I10), 1, 0))} creates a table where the first two columns are your B,C (Country, Age) and the other six are filled with 1 or 0 depending on whether the cells in D-I are filled or not.
select Col1, Col2, count(Col3), sum(Col3), ... group by Col1, Col2 selects Country, Age, the total count of rows with this Country-Age combination, the number of rows with thingA for this Country-Age combination, etc.
the last argument, 0, indicates there are no header rows in the table passed to the query.
It's possible to give labels to the columns returned by the query, using label: see query language documentation. It would be something like
label Col1 'Country', Col2 'Age', count(Col3) 'Total count', sum(Col3) 'thingA count', ...
Add a Count column to your data with a "1" for whatever occurrence, this might solve your problem in the Pivot Table. I was just looking for a solution and thought about this. Working now for me.

Multiple Sums at Column Level

I need to create following report, i tried crosstab but it looks (or i dont know) it only support one level for columns. By level i mean Count, Amount, XYZ under DAYS columns (30,60,90).
How can i add multiple levels at Column side using Crystal Reports 9.2?
I am getting data from following table
XXXXXX, DEBIT_CREDIT, CCY, AMOUNT, COUNT, OUR_THEIR, SETTLED_OUTSTANDING, DAYS, RATE, YYYYYYYY
You can create multiple levels of columns by dragging the next column to the top of the current one.