I have an SSAS 2008 cube that I'm connecting to from Excel 2010.
The cube works great, however some users have a business need to filter by a measure. In Excel when you drag a measure to 'Report Filter' in the PivotTable Field list you get an error.
Say for example you have a measure that is the Total Time To Make Something. Some users may only be interested in seeing data where that measure is greater than or less than some number of minutes.
Is there a way to accomplish this in Excel without modifying the cube in SSAS?
Thanks for any help on this!
Try this:
Drag measure to Values.
Drag dimension attribute to either rows or columns.
Assuming you drag dimension to rows, you'll see a drop down on the
cell where it says "Row Labels".
Click on the drop down and select Value Filters and choose the
filter you want.
Finally enter the filter criteria and click ok.
You can filter using measures by using the Value Filters option instead of Value Label Filters. Label filters works for dimensions and Value filter is for measures.
Related
Is there a way through VBA or some other excel functionality of which I'm unaware where you can update a filtered pivot chart based on keying in a value to a given cell (like a prompt) as opposed to a slicer? (Or is there some other dynamic chart option other than a pivot chart that will allow the charts to changed based on input values?)
The slicer is too visually busy for what I'm wanting to do. I've also looked into the "search box" trick, but I'd rather just update the chart based on an input value to a specific cell.
To try to add some code to help explain... If this were a (very simple) SQL query, it would look something like this with the ? prompt set to a specific cell but it would obviously return a chart (and with a time element not in the SQL) instead of a query:
SELECT A.Unit, SUM(A.Amount)*-1
FROM Table A
WHERE (A.Unit = ?)
GROUP BY A.Unit
HAVING (Sum (A.Amount) <> 0)
ORDER BY 2
As always, I apologize if this type of question has already been answered and if I just haven't found it. Any help would be greatly appreciated!
EDIT: I'm only looking to dynamically update a chart based on an input cell. I can and have used SUMPRODUCT to get the same information on another tab in a normal spreadsheet, non-chart format. I want to make a line-chart with the time element on the X-Axis, and the unit filter (as seen in the query above) be an individual input cell as opposed to a bulky slicer. I would share images if possible, but I can't without creating a link.
Not sure how complicated your data are, but could you just use SUMIFs formulas?
Cell H2 formula:
=SUMIFS(D:D,A:A,$H$1,B:B,$G2)
I need your help on the below two points:
1) When I subtotal the value based on the allocation key, the fields where i have used avg() to sum up the percentage is not summing up correctly.
2) How can i provide the different color coding for the sub total row and the header in the report.
Please refer the snippet for your easy reference.
Thanks in advance
enter image description here
Coding:-
Avg(If([Qtr]="Q1",[percentage])) as [Q1 %],
Sum(If([Qtr]="Q1",[Total Value $])) as [Q1],
Avg(If([Qtr]="Q2",[percentage])) as [Q2 %],
Sum(If([Qtr]="Q2",[Total Value $])) as [Q2],
There has been an update since 7.11 to allow the user to toggle between calculating values on the underlying data or whats shown in the cell values of the pivot table.
It is now possible to configure the cross table to calculate subtotals
and grand totals based on the aggregated values visualized in the
table, as an option to calculating it using the underlying row level
data. This is useful, for example, when you want to visualize the sum
of the absolute values of the categories displayed in the table:
As far as I know, you cannot do color customization to the Sub or Grand Total rows. You can edit the appearance of the Header row by View > Visual Theme > Edit Custom Theme and modifying the Details Tab. You can also pull in a template from one of the Spotfire Sample Reports that already do it if you want.
https://community.tibco.com/wiki/whats-new-tibco-spotfire?
The 6.5.3 User's Guide says this regarding the first question:
Note: The aggregated value for subtotals is not calculated on the
values shown in the cross table, but on the underlying row values. For
example, if "Average" is used as aggregation measure, the subtotal
average of a column is calculated on the rows the column is based on
and not on the values shown in the cross table.
I believe that "subtotal average" means the average of the rows involved in the calculation. I don't see any way to customize the way that subtotals are calculated.
For your second question, I don't believe that there's a way to do that, unfortunately.
I would like to obtain the max call time that was on each day, the average of all the calls that day, and any calls that exceeded 20 seconds.
Due to the security policies at work I am limited to the formulas provided by excel, I can't use macros or VB (otherwise I would just write something suitable). I don't have much experience with excel, so I apologize if this is a simple one. I have tried to find ways to search and return a subarray that I could easily manipulate, but it seems the only way to do that is with macros. Currently I think I can use VLOOKUP, but I don't really understand enough about it know if I can use this with another function.
Essentially, if there is a formula or a combination of formulas that I can use that will allow me to collect all data from column B that shares the same values in column A, I could nest that in the formulas I need to calculate the data.
Any help is appreciated!
This can be done with a pivot table in just a few clicks.
First, turn the source data into an Excel Table object, by selecting one cell in the table and then using Insert > Table or Ctrl-T. Add a helper column for the calls over 20 seconds. Let the column be "long calls" and the formula
=IF([#Duration]>TIME(0,0,20),1,0)
Then, with a cell of the Excel Table selected, click Insert > Pivot Table. (The pivot table is now linked to the Excel Table object and when more data is added you can refresh the pivot table without having to change the definition of the source data.)
Drag the Day field into the rows area and the Duration field into the Values area. Right-click any of the value results in the pivot table, and in the Value Field Settings dialog select Max. Then click on Number Format button and set the custom number format of hh:mm:ss. Confirm all dialogs.
If you want to format the date, right click any of the visible dates in the Pivot table, select Field Settings, click Number Format and then set the custom format ddd.
Drag the duration field into the values area again and set its calculation method to Average.
Drag the "long calls" field into the values area.
Hide the Grand Totals via the Pivot Table tools Design ribbon command.
Now you can add more data to the table in columns A to B, right click the pivot table and select refresh.
I have a pivot table in Excel, and I'm trying to do some calculations on the results. This is all fine and good, but I'm running into a problem due to the grouping of a pivot table.
I have a dataset indicating transaction history for a particular client/patient at a vet clinic. These are reflected by clientID and patient name in my pivot table. I've used a pivot table to group by client then patient to see when the first purchase was made and how many total purchases there have been. I want to then do a calculation on that for each patient.
My problem is here. Excel has all the data for each client grouped in what I'll call "tier 1 results". The only data I want to do the calculation on are the "tier 2 results". These are row 7 and then rows 8-9 in the screenshot below.
In effect, I wan to include something in the equation in column F to ignore any bold text, but Excel doesn't appear to be able to do this. VBA is an obvious solution for me, but I'm creating steps for salespeople to use to analyze the data while they're out in the field. We need to keep things as simple as possible. Copying and pasting an in-cell equation is one thing, but using VBA is way over their heads.
Any thoughts on how to ignore the tier 1 results?
Your pivot table uses compact form layout, where all the groupings appear in one column. You can change that to tabular form to have each group level in its own column. The screenshot shows the difference:
Click a cell in the pivot table and then Pivot table Design ribbon > Report Layout dropdown > Tabular form. There are other settings to get rid of subtotal rows, etc.
Now you can build formulas that take into account only the level that you require. (It is also possible to repeat the pivot group labels for each group level where there are blanks.)
I am using an Excel 2010 pivot table to display data. I need the sub totals in most columns but some columns display percentages and totaling the percentages is not correct and displays confusing values. Is there any way I can choose which columns not to total.
It's hard to make sure I'm accurately addressing your question without more detail about your data, but I will provide a simple example.
Recommendation
I would suggest that you put all measures/values in the Values area of the Pivot Table, and not in the Row Labels. That way, you will not get Row sub-totals for values.
In order to address the non-additive totals and sub-totals for your percentages, I recommend that you remove the pre-calculated percentages from your Pivot Table Values and instead use a Calculated Field that is calculated within the Pivot Table itself from the base data, and will provide correct aggregate totals and sub-totals.
Example
See below:
Method
In order to create a Calculated Field using the Ribbon, select your Pivot Table, and then go to PivotTable Tools --> Options --> Fields, Items, & Sets --> Calculated Field.
Then, enter a name for the new Field (CalcPercentSoldUnits in my example below), as well as the formula definition for the field ( =UnitsSold /UnitsProduced in my example below). Click 'Add' to create the field and then 'OK' to exit the dialog box.
Now you have created a derived field not in your base data table, but in your Pivot Table, which can be used just like a normal field. You can also see that it will calculate totals and sub-totals correctly because instead of adding constants, it is calculating based on the sums of other constants from which the percentages are derived.
In some cases depending on how your data is structured, you may need to create a Calculated Item instead of a Calculated Field.
I hope this helps - if this doesn't address your situation, please post additional examples of your data and desired results. Thanks!
I have the same problem. Some Columns should be totaled, and others should not be. The only thing I figured out is to Grand Total all columns, then format those cells in the Grand total so that the font color matches the background color. This hides those selected Grand Totals from being viewed and/or printed. I experimented by expanding the Pivot Table rows, and the formatting for the selected cells followed into the new cell(s) and when I removed some of the rows, the formatting followed as well.
Wherever you don't want to show the total columns simply hide the column in the total section. I couldn't find any other way to do it.
Be careful about things like distinct/unique counts. This method helps with percentages, but you don't want to sum or average or otherwise aggregate unique counts. I would prefer to be able to just exclude a total for a single field but haven't found a method to do so.
I think I have a similar situation and a great answer for presentation purposes. I'm billing a customer for unbilled items; my pivot shows Qty, rate, and total missed revenue (qty*rate) for each month. Having a sum of Qty and Revenue makes sense for each month, but totaling the rates of the items doesn't. Pivot table and value options are an all-or-none solution. Rather, I just selected the totals I needed to hide and formatted them with white font color (blue for the grand total). My pivot table looks great now with this band-aid approach.