Excluding a pivot filter item in Excel - excel

I'm pulling my hair at this one. I have a Table with some categories of data ("Income", "Health", "Housing", "Education", "Others") with their respective subcategories. When I create a Pivot Table, we have this categories as filters. But I don't want a certain category, let's say "Income", to show up in the filters menu neither do I want it to show in the pivot table. Is there any way to do it?

Due to low rep, I need to answer in order to clarify your question. Do you mean that "Income", "Health", "Housing", "Education", etc. are all categories of one column? In this case, you cannot have this particular field hide the items in your filters. You can, however, add a field in your table that looks like this (assuming your category field is in column A): =IF(A2="Income","",A2). Lets say that field is in column Z. give that field a column header you wish people to see, select your data source for the pivot table to not include the first column (column A) but include column Z. The user will be able to see an option for blanks but not know what that choice represents.
As an aside, if this is a privacy issue and you are wanting to report data via a pivot table but hide certain information, you must NOT include the sensitive information in your data source AT ALL. any sophisticated Excel user can obtain that sensitive data with ease. You are better providing a data set for these users to run their reports off of, which do not contain any of the sensitive information at all.

Related

How do I use XL Data Tables with XLOOKUP for Data Validation

I have a data table based on a query -> tblPrimaryProducts
tblPrimaryProducts has many columns, some of which are Category, SubCategory and Item.
If I were to use a filter on Category I would of course be able to see the SubCategories and Items in that Category. Likewise if I were to apply a filter to SubCategory in turn I would see a list of on the items in that specific Category + SubCategory selection. Ultimately this is the goal of data validation I am trying to implement.
There is a data entry table -> tblPackages
tblPackages has many fields, but importantly the three listed above need to be implemented in a controlled way via data validation so that each row can have the correctly selected Category + SubCategory + Item
I am unable to change the data table into an array or simple (or dynamic) named range because it will be refreshed any number of times and the column positions will potentially alter. This means that I have to use the table based naming system for both tables.
What I have so far is the following for a data validation formula using XLOOKUP:
XLOOKUP([#[Primary Category]] & [#[Primary SubCategory]], tblPrimaryProducts[Category] & tblPrimaryProducts[SubCategory], tblPrimaryProducts[Item],,0)
[#[Primary Category]] and [#[Primary SubCategory]] are fields in the tblPackages data entry table. The other fields listed come from tblPrimaryProducts. So far I have entered data by hand to test this out.
In the XL Formula window (where you can 'see' what your formula is doing while you fill in the fields) this seems to work and provides the output expected.
When I try to implement this as data validation it complains about an error in formula. If I place an INDIRECT at the beginning I get the syntax error popup. I have had issues in the past with INDIRECT that have been solved with the careful use of quotation marks. I cannot seem to find a way here to do this.
Does anyone have any ideas on how I might implement some data validation based off of a data table (as opposed to an array), or the query that the table is based on in this situation? Under normal circumstances I would use dynamic named ranges but here I cannot.
Any help or ideas greatly appreciated
In Office365 the following formula will get you the list of "Items" that satisfy the "Category" and "Subcategory" conditions.
=FILTER(tblPrimaryProducts[Item],(tblPrimaryProducts[Category]=[#[Primary Category]])*(tblPrimaryProducts[Subcategory]=[#[Primary Subcategory]]),"")
It will give you a #SPILL! error if inserted in a Table and it returns multiple items that match the two criteria. You may have to redesign your output table.
If you are intending to display just the filtered values, you can then use two dropdowns with list of categories and subcategories. The filter function can then use these cells to filter the Items from source data and display as a list below.

SSRS Cells auto-merge

I'm having trouble unmerging cells on the report.
3 Suppliers for the query
I have a SQL query that shows 3 instances of a supplier (left joined to contact) as shown below. However, when running the report for the query the 3 instance of the supplier is merged into one. This is not desirable in my case because when exporting the report to excel, I'd like to be able to sort columns based on other properties, however, this would not be possible due the the merging of the rows. How can I get results to show individually?
Cells are Merged on the report
Within the properties of each Row Group you can specify which columns to group on. You generally don't need a separate group for each field, but that's OK. In your last group, the one called "(Details)", if it is not grouped by anything, it will show one row per line of results from the query. So take a look at what it's grouped by. As long as the rows are in your dataset, the report will group or show them based on how you configure the grouping here. Grouping on nothing means it will show all rows.
Another tip is to align the end of your header textbox with the line of one of your columns. This will prevent it from creating an extra column in Excel for the "City" field.
Your report does not need all of those groupings - the SSRS grouping is not like SQL. You should only group when you want to aggregate data on that field. Normally you might have a company with its address in various fields in one group but you only need to group once on the Company Name or (preferably) ID - not on each field and not a separate group for each. You could then show details of various invoices in other columns that aren't grouped.
But since you want to display the company data on each row, you would not want ANY grouping on the company.
To fix your issues, remove all the groupings (but not the rows) and just leave the detail group (which doesn't have a Grouping).
You can check out MS Docs: Understanding Groups for a better explanation.

Variance between the same objects in different columns

I've got a pivot table that contains Countries in Rows and few different types of revenue in columns, grouped by Scenarios. I've got 5 types of scenarios, and I need to show 2 of them at once for comparison.
It looks like this:
ScenarioX ScenarioY
Revenue1, Revenue2, Revenue1, Revenue2
Country1
Country2
The problem appears when I want to add a variance columns, that would calculate the difference between Revenue1(ScenarioX) and Revenue1(ScenarioY) etc.
I know how to use calculated fields, but this case is much harder, is it even possible?
I have tried to add a standard table right next to the pivot table, that takes the values directly from the pivot and calculates them. It works, but in this case i will need to hide and expand the table basic on the revenue type filter, which crashes the table.
ScenarioX ScenarioY Variance
Revenue1, Revenue2, Revenue1, Revenue2, Variance 1, Variance2
Country1 Rev1X-Rev1Y, Rev2X-Rev2Y
Country2 Rev1X-Rev1Y, Rev2X-Rev2Y
What I need exactly is a hint, how to add the calculated fields, or other methods (through vba maybe?) to make the table look like above?
Ok found the solution finally, posting here, maybe it will help someone:
Duplicate the field in the pivot table "VALUES" area
[optionally - change it's name to "Variance"]
Right click on the new field -> Value Field Setting -> Show Values As tab
In the Combo Box change the field to "Difference From"
In the Base Field in my case I had to select "Scenario", in Base Item - the scenario that
will be substracted from the main one.

Displaying multiple tables using a cells values as criteria

I will have Multiple Tabs, each tab will be called
Alpha, Beta, Gamma, Delta etc
Every tab will have contain multiple tables containing values, called...
{TABNAME}First, {TABNAME}Second, {TABNAME}Third, {TABNAME}Forth.
this will ultimately give me 4 tables for First called,
AlphaFirst, BetaFirst,GammaFirst, DeltaFirst.....
I was wondering if there is anyway i can pick/input a value in a cell, on a tab with none of these tables, for instance select 'Third'
And below this cell, or anywhere on this tab all version of 'third' will appear, so the tables for AlphaThird, BetaThird, GammaThird etc will appear, either seperatley, or the data merged into a single table.
if you need more information or examples, please let me know and i will update as best i can.
I guess to summarise, is it possible to call forward multiple tables using a cell as the criteria for which tables to call forward.
Further details - Edit
Every table will contain the same column headers and contain the same ranges of data within them. They will always have the same number of columns, However each table can contain any amount of rows.
The values in the tables are all manually typed or picked from a pickList, containing no Formula
To put this into a Scenario, there is 5 shops, a Tab for each, On each Tab is a Table for each Supplier we have, containing any Order information from that store for each supplier.
I wish to choose a supplier on a separate tab and have all orders with that supplier appear on the page for every store. the Store name does not need to be displayed, i just wish to know what is on order with that supplier.

Pivot tables without aggregation?

I have a list of items - each item has a title, plus a bunch of attributes, including a date.
If I drop the date into the row box of a pivot table, then group it, and drop the title below - so I have Years, Quarters, Created On, Title, I get a nice list of all the titles in my data, grouped by year, quarter and month.
But I want to also display all the other attributes next to the title of each one - all the associated data for each row. With the textural ones, I don't want to count them - I just want to list the entire data set, but grouped by date. If I add them to the other pivot table boxes it starts doing the usual counting...
It would be nice to have all the extra filtering power of pivot tables, but am I making this too hard?
Thanks for your help.
To display text data, you will need to use the data label feature.
Non pivotable text aggregation is easily accomplished in M code in power query One of my posts.

Categories

Resources