I have a MySQL DB and I fetch data from there via PowerPivot into a table.
Then I created a PivotTable from this table data.
Now the column month holds the month of the record as an index from 1 to 12. This doesn't look pleasing to the eye, hence I would like to replace the index with its respective month name.
Like "March" for 3.
Here comes the concept of the lookupt table into play. So I set up a lookup table for the month names in the sheet "Lookup-Tables".
I clicked the "create related table" button ...
... and next thing I see is the very month table in the PowerPivot window. The respective sheet I called "month names".
what is missing is the link of course:
As you can see I established a link between the original data table's column "month" with the lookup table's column "index".
but no matter if I refresh or even create a new PivotTable ... month still shows the index instead of the month name.
when I go back into the PivotTable I can select the lookup table's colum "index" which leads to a yellow message stating that "maybe the relationships should be freshly established". I click "do so" and next I see is a message that says that no relationship could be established!?
I don't get it?
My goal is pretty common sense and straight forward I think. If you have a different solution from using lookup tables ... maybe using DAX (which I don't know much about yet) ... that would be great.
Try this. Unselect the two red checkboxes highlighted below and select the green checkbox. Let me know if this solves your problem
Related
I need to find a way of determining the row number from the data source table of the selected cell in my pivot table.
The reasoning behind this is that I want to be able to edit/update the values from a UserForm.
My table with the data source is in sheet 1 named Data and my pivot table is in sheet 2, named Project management.
I know I can edit values in a Pivot Table by setting
EnableDataValueEditing = False
..but this does not give me the desired result since my original data remains unchanged and I also have hidden columns that I use for conditional formatting only and it would be a bad user experience to have to unhide the columns every time I need to edit them.
Does anyone have any idea or suggestion as to how I can retrieve the original data row number for a specific cell in my pivot table ?
As an example, the top is my original table and the bottom right is my pivot table. When the cell "Dummy Data" is pressed, I want it to give me the Row number of that data from my original table.
A "bad" workaround would be to use VBA to match the selected cell
value with the data from the table and when the match is found,
retrieve the address but this is not foolproof, the data should be
unique but with more data flowing in over time, this might not be the
case anymore. Therefore I am trying to avoid this method.
PS: if someone could edit my post and embed the image, I would highly
appreciate it.
A pivot table is a report summarizing information from the linked table or query. The only ways you're going to be able to update the information is if you know the row ID/number you want to change or filter the data source down to a point where you can identify it.
If you're going to be keeping and altering records, I'd suggest building a database (Access, for something quick and easy) to enforce some form of integrity and then link your pivot table and form to that database.
EDIT: VLookup or Index(Match(...)) is only going to return the first hit and that may not necessarily be what you want.
I will put my non-orthodox but perfectly functional way of doing it just in case someone is facing a similar issue or until a better way arises.
I have actually added a new column in my data table with the formula
=ROW([#Column1])
This gives me the row number for every entry.
Next I am just adding that column as a row in my pivot table, display in tabular mode to have it's own column and hide it. Therefore when selecting a cell, I am looking in the hidden column for the number and therefore I am getting the source data row number.
I run a customer service department (I'm new to this so need to learn quickly) and I'm trying to get some analytics on our customer service requests. I have a table in excel documenting every individual service request and I would like a graph showing the total number of requests per customer.
I could write this manually (see below) but I would like it to automatically update as more service requests are entered.
I have tried looking for answers to this but can't find any that update automatically or that don't require a table elsewhere to be manually updated with each new customer. We often get new customers and I dont want to have to go back to this every time to update a reference table or customer list.
Surely there must be a way in excel to "Count all entries of each occurrence of a name in a column" in some kind of smart way?
I would really appreciate help with this!
Thanks in advance!
If you have 365 you could take advantage of spilled ranges.
On your second image put =UNIQUE(Table1[Customer]) in cell B3.
Put =COUNTIF(Table1[Customer],B3#) in cell C3 - this formula will
spill to all your unique customers.
Create two names ranges:
One called XAxis which references =Sheet1!$B$3#
One called ChartValues which references =Sheet1!$C$3#
Create your chart:
Set series value to =Sheet1!ChartValues
Set axis to =Sheet1!XAxis
Change Sheet1 to whatever your sheet is called remembering to wrap with ' if it has a space in the name.
Better to use pivot tables.
If below is your data,
Go to Insert > PivotTable
A popup will show like below
Specify the Table/Range
Specify also the Location (anywhere in the Existing Worksheet)
The view below will be displayed
Click the Customer checkbox and also drag the Customer field to fill the VALUES box as shown in the image below
You desired table will be displayed as below
Please vote up if okay.
Thank you everyone for your suggestions. I found a solution from multiple answers and comments.
I ended up going to my original table that I am using to create new service records. I added a column called "1" and just entered the number 1 in that column, for every row. I then "Hid" this column in the usual fashion.
I then created a pivot table from this table and selected to display columns "Customer" and "1" and used these columns to produce a bar graph. Here is the result (With the column "1" unhidden):
tl;dr:
Excel is unable to do this in any smart way, create a column in the original table contianing the number 1 so when a pivot table is made, it will auto sum the 1's for entries from the same customer. Create a plot from this.
It disgusts me . . . but it works.
I have a table of employees with their work location (state initials) and their work status (FMLA leave, part time, full time). I've made a pivot table so that I can see the number of employees in each state relative to their status. Making the pivot table is easy, and it looks like this:
My question relates to the column field name cell (highlighted in red). When the table is first created, Excel auto fits the columns. However, if you look at the picture, it is clear that ideally the FMLA, FT, and PT, columns should all be the same size for the table to look good. I can resize the columns, of course, and set the table to not auto size when it refreshes.
When I resize the columns the table now looks like this:
Two problems with the new layout. First, it is not clear at all that the "Employee Status" field name applies to all three columns FMLA, FT, PT. Second, with the first column being narrower "Employee Status" no longer fits. In Excel 2013, the field name is limited to just its column. In Excel 2016 it spills over to the next column, but has the filter pulldown in the middle of it! And of course the formatting doesn't spill over.
In a non-pivot, I would "merge" the three cells above the column headings and make "Employee Status" span all three cells. Leading to a much more intuitive look. However, "merge" cannot be used in pivot tables. My only work around at the moment is to Hide the row with the field name, and put a new row above it that is not part of the pivot table. Ends up looking good, but of course, it will not dynamically adjust if a new value is added to "Employee Status".
I'm looking for other recommendations on how to format this table so it ends up looking like this:
Ideally solution will work with Excel 2013, which unfortunately is what I'm limited to.
I want to compare row value of a column with different rows of one other column in Spotfire.
Requirement is whenever Issue ID is on Hold, its childIds also need to be on hold. Seems to be a quick fix however I am stuck around this
Please refer the screenshot
Thanks in Advance!!
If you go to the Add Data Tables section, and select the name of the original data table in the section titled "From Current Analysis", you can add a second Data Table based off the original data.
Then go to Edit, Data Table Properties, and go to the Column Matches tab -- delete the current column matches (Presumably it matched "Issue ID" to "Issue ID" etc), and then add a new Column Match where your original table has "Issue ID" selected, and the other has "Parent ID" selected.
At this point, you can make a cross table based off of the original table, where Issue ID and Parent ID are along the Vertical Axis. In your aggregate, add the following code (substituting the name of your second table where it says "Parent"):
If(Max([Status]) is null, Max([Parent].[Status]), Max([Status]))
I am using a pivot table to display data. In the pivot table I have countries and under each country couple of names. Then how many training a person led and how big attendance there was.
I have two questions:
1) In the data source, I created additional column where is displayed the last training date (latest date) for every person. Meaning that in the source data, in every row for one person, there is always the same "Last training date". I would like to take this information a show it in the pivot table. But anywhere I put it, it's always used as another filter and it makes the table much more complex. I would like to have just a custom column with this info without having to expand the whole table. It's the last column in the example image.
2) Same applies for the attendance. If the training has been cancelled, the attendance is always 0. Is there a way to hide the whole column? Same for the total of attendance. I don't really need these columns.
Try This:
First question:
In the main table change the [Date Field] to type Number
Put the [Data Field] in values into the pivot table
Select any value where is the column [Date Field] and right click:
Go to Summarize values by select Max
Again right click. Go to Number Format...
Select the date format what you like
Second question:
I would like to see a data's sample. It could be fake. I have some ideas but is difficult to see just guessing...