Custom Column Filter on Pivot Table in Excel - excel-2007

I have an Pivot table in an Excel Sheet where i want to put an custom filter on the label Worktype.
The Worktype can have only 5 values i.e.
Non Production, REX, QA, RES, BP.
The filter should be like this that:
IF(WorkType Contain only "Non Production) then Show "Non Production" in WorkType,
else Hide "Non Production" in WorkType and show remaining WorkType (REX,QA,RES,BP) .

In essence this answer is "you do not need a 'custom' filter, standard features do exactly what you would like done" (if I am understanding your question).
With dummy data as shown and two pivot tables (to show different selections via filter):
In the smaller pivot table only Non Production is ticked in the filter selection and in the lower pivot table that selection is inverted.
I appreciate this may well not be what you wanted, but if so further clarification may be appropriate.

Related

Is it possible to add 2 rows of header to a Microstrategy Dossier?

in Microstrategy Dossier, is it possible to create 2 rows of header, such that the first row is the grouping information and spans to number of columns to identify as a group? for example : group "Inbound costs" should span to "Dep1 | Dep2 | Dep3" and "Outbound costs should span to " Transportation | Energy | Warehouse " ?
It will be a bit different if you are grouping attributes or metrics, but I think it should work either way.
If grouping attributes, that is pretty straightforward. Put the attribute in the columns, then right-click and select "Create Groups...". From there, put the elements into one group that is labeled "Inbound Costs" and make another that is labeled "Outbound Costs". Once you have the group made, then just drag in the original attribute under it. Might need to play with formatting to make sure that the repetitive cells are merged and centered, but that would group the attributes across the columns.
If grouping metrics, it is a bit more involved. First, do "Change Visualization" on your grid and set it to "Compound Grid". This will allow you set the different sets of columns that behave differently.
Then, put the "Inbound Costs" into one column set and the "Outbound Costs" into another column set. This groups them, but doesn't label them quite yet.
To label them, right-click on any attribute in the dataset panel and select "Create attribute...". Name the attribute whatever you'd like and have the definition be "Inbound Costs" and set the data type to "String". Drag this new attribute above the metrics in the first column group (making sure it is still in the group). Repeat the same for "Outbound Costs" and then work on formatting to merge the repetitive labels and center.
Here is a quick screenshot of how I was able to make it look using some fake data, if that is what you were indeed trying to do.

Excel 2007 Pivot Table, Different Formulas in Different Columns

Created a Pivot Table in Excel 2007, and it seems I can only make it do one type of calculation at a time.
Is it possible to provide an average in one column, and a sum in the next?
When I click on "Value Field Settings", choosing any of the options applies it to every column in the Pivot Table, can't figure out how to apply it to only one column.
You can have a different calculation.
When you drop a field into the data section of the pivot change the calculation to sum.
Then drag the same field across again this time change it to average

Qlikview: how to create summary table to filter multiple associated tables

I have 4-5 tables of single and many rows per ID. I want to generate a summary table listing each ID along with various counts and max/mins, but I want to be able to filter on calculations. Example: "ID" is the identifier and there are two tables, TestA and TestB.
One desired selection criteria: Show only those IDs where at least one TestA score >5 and there is at least one TestB score.
In a straight table, this is simple to do with expressions, but the resulting table cannot be selected on the calculated true/false value.
I think I need to create a new table in the load script containing the ID, and then various conditions labeled as I wish. Then, these fields could be dimensions. This seems similar in concept to a master calendar. Am I on the right track?
If it helps to understand my example, this a medical application; the tables are lab results and other interventions that each require complex queries pulling data from various sources that are very "hard-coded" to produce a small data set from millions of rows of highly normalized source data. The desired dimensions would be combinations of the labs so as to allow identification of patients who meet certain criteria--then, once filtered, there would be many more graphs and charts to identify what tests and procedures were followed for that group of patients.
My current data model just loads many tables which then associate on ID. I had attempted to load all data into one big table using concatenates and calculations, but this did not seem to accomplish what I needed and was difficult to manage.
IIUC, I think what you want to do can be accomplished with a combination of sliders/input boxes, variables and calculated dimensions in your table. The process is definitely burdensome, but it should allow you filter the way you want.
Add a field to your table load statement in your script like rnum as RowNo().
Create a variable for your filter(s). Ex. vFilterTestAScore.
Add a slider or input box to your dashboard and point it to that variable.
a. For slider, the option is in the General tab -> Data header -> select the Variable radio button.
b. For input box, add the correct var from the list to the list of Displayed Variables.
Set sliders/input boxes to the criteria you want: vFilterTestAScore = 5 and vFilterTestBScore = 1
Create a straight table with ID as the dimension and expressions for TestAScore and TestBScore. The expression formulas would be sum(TestAScore) and sum(TestBScore) respectively (this won't make sense until the next step).
Now add a calculated dimension to you table. The idea here is that rather than just having the ID dimension, you will create a calculated dimension that only displays the ID of the records that meet the criteria you select in the slider or enter in the input box. The formula should be something like:
if(aggr(sum(TestA), rnum) >= vFilterTestAScore, ID, null()) or for multiple filters: if((aggr(sum(TestA), rnum) >= vFilterTestAScore) and (aggr(sum(TestB), rnum) >= vFilterTestBScore), ID, null()).
On your new calculated dimension, check the 'Suppress When Value is Null' box so only results that meet your criteria are displayed in your table.
To summarize, you are using the variables to store your selection criteria which you are entering via input box or slider. Then you are conditionally displaying only the ID's in your table that match those criteria via a calculated dimension and 'Suppress When Null' option.
I can send you a .qvw if you aren't using the free personal edition and are able to open other qvw's.

PowerPivot - How to filter columns yet retain grand total

in the table below, I would like to graph a subset of the columns, specifically the ones highlighted in green. however, I would like to compute the percentage based upon the grand total of the whole set. filtering columns rescopes the data set and hence the denominator.
I would like to show and graph columns "4" and "Excellent value (5)" while retaining the current "Grand Total." for the ct row, for example, the value would be 8/14 for column "4", and likewise for other cells.
as a candidate solution, I created a secondary table which references the table shown below. is this the cleanest way to accomplish the goal? it seems a bit kludgey and rather time consuming.
ultimately this graph will be rendered in sharepoint so it needs the dynamic interaction with the ssas data. I am assuming that this will be the case since my derived table is using the GetPivotData function which the parent table uses.
You need an ALL() to open out the filter context which in turn means that it doesn't matter which columns are selected.
Assuming you have a table called 'table' and a column called 'response_id' you could use something like:
= SUM(COUNTROWS(table)) /
CALCULATE(COUNTROWS(table), ALL('table'[response_id]))
If your real life problem is more complex then you might need to adjust the ALL() to include other columns or look at ALLEXCEPT() to do the opposite.

Group and subtotal columns in Reporting Services 2005

I have a report (RS2005, against a MSSS2005 instance) which I have inherited. It shows a basic table of data: a handful of key fields which are used to group rows together, a few basic numeric fields, then a number of dated ('bucketed') fields (e.g. 1 month away, 2 months, 6 months, a year, 2 years, etc.)
The user would like to group together these dated fields in aggregated groups and be able to collapse or expand the columns as you can the rows. So we'd be able to show the next year's values' subtotal or expand it to break it out by month. Hiding the invidual months if the subtotal is shown.
This is basic pivot table behaviour (and can be done with the Group/Subtotal feature on Excel - that's the closest analogous behaviour I could use to describe the requirements).
While grouping by rows seems trivial in RptgSvcs, grouping columns and collapsing a group into a single subtotal and blowing it out again, seems hard to impossible.
Unless someone knows better?
You should be able to do this by selecting the columns that you would like to hide and set their visibliity to be hidden.
Then set the toggle item on the hidden columns to be the textbox that shows the subtotal.
This textbox will then have the [+] symbol on it, and clicking will show/hide the your month-by-month breakout(the hidden columns).
On the right hand side of the table control on your report (RDL file), you should see icons representing the detail and grouping information for the table.
Here you can see whether or not a grouping has a header/footer and how it is calculated e.g. =SUM(fields!mySalesValue)
You can also set things like whether it is collapsed and so on