Column order in PowerView - excel

I have following sample data in PowerPivot:
id name type color
1 aaa x blue
2 bbb y red
3 ccc x blue
4 ddd y orange
5 eee z black
When I create pivot table in Excel and enable show details (doubleclick on specific value), I get follwing output:
[$Sheet1].[id] [$Sheet1].[name] [$Sheet1].[type] [$Sheet1].[color]
1 aaa x blue
2 bbb y red
3 ccc x blue
4 ddd y orange
5 eee z black
What I'd like to set is my own column order or specify columns which I want to see. E.g.:
[$Sheet1].[id] [$Sheet1].[color]
1 blue
2 red
3 blue
4 orange
5 black
Could you please advise? Thanks

You need to merge the sort table with the main table, so the sorting numbers are inside the main table. Then you can click the Colour column and set the sort order to the sort column using the "Sort by Column" command on the Home ribbon of the Power Pivot window. In the screenshot, I have added the desired sort numbers
1 - red
2 - blue
3 - black
4 - orange
and added the values in a new column. Then defined the Sort by Column and created a pivot table where the color data is in the rows. Note how the desired sort order is applied correctly.
There are many different ways how you can get the sort numbers into the helper sort column.

Related

Get pivot data & vlookup with multiple criteria

I have the following pivot table:
ID
Name
Ranking
123
Red
1
123
Black
2
123
White
3
124
Black
1
124
White
2
124
Red
3
Considering two conditions: ID&ranking I would like to look into the pivot table and retrieve the name. For example, for ID 123 & Ranking 2 I would like to see the name Black as result.
Any hint to write the formula in excel?
You can use a standard FILTER function and multiply the two criteria to get your filter list
=FILTER(B1:B7,(A1:A7=123)*(C1:C7=2))

Excel sort by similar cell data

So I have this list of data that i need to compare 2 spreadsheets with. Im going to simplify it with a list like below(Column A being a part number, and column B being a quantity):
Spreadsheet 1:
Red 1
Blue 2
Green 1
Orange 6
Yellow 8
Spreadsheet 2:
Red 1
Green 1
Blue 2
Orange 6
Yellow 8
Silver 2
Brown 3
Now what i would like my output to be:
Red 1
Blue 2
Green 1
Orange 6
Yellow 8
Silver 2
Brown 3
Notice that im sorting it so that list 2 aligns with list one, and if list 2 contains things that are not on list 1 it puts it at the bottom(preferably vice-versa compatible). Im not sure if this is even possible, but if it is it will GREATLY decrease my workload so any help is MUCH appreciated. Thanks for your time!

Spotfire Cross table visualization - Coloring the columns based on column header

I have a cross table visualization as shown below,
Product Group1 Group2 Group3
ABC 1 --- ---
EFG --- 1 ---
HIJ 2 2 1
KLM 3 3 1
NOP 4 4 1
Is it possible to color the columns based on column header, for example i want the column "Group 1" to be coloured in Yellow, "Group 2" to be coloured in pale green and group 3 to be coloured in Green.
Appreciate your response!
If you go to the properties of the cross table and then look at Colors, you can see on the top of Colors, the header color by. By default this stands on Cell Values. You can change this to your header column. Next you have to add group 1 to the Color Scheme Groupings and set this color to Yellow with color mode fixed. If you do the same for the other Groups, your cross table will be colored as you want.

Counting word "pairs" in excel between different columns

I'm wondering if it's possible to do this in excel:
Let's say I have these columns:
Column A | Column B
Apple | Red
Apple | Green
Pear | Green
Pear | Green
Is it possible for me to count how many times a set of "pairs" appears.
For example -
I want to count how many times "pear" and "green" appeared in my spreadsheet next to each other (not individually).
So for the above I should get:
Apples + Red appears 1 time
Apples + Green appears 1 time
Pear + Green appears 2 times
I tried using the COUNTIF function, but I don't think it can count a set of pairs like this...
If the above is possible... is it further possible to break down the data by time? For example, we have these columns:
Column A | Column B | Column C
3/7/2013 | Apple | Red
3/7/2013 | Apple | Red
3/8/2013 | Apple | Red
3/8/2013 | Pear | Green
3/8/2013 | Pear | Green
3/9/2013 | Apple | Red
3/9/2013 | Pear Green
If I want to organize the data by day, how can I do this? For example:
I want to display that on 3/7/2013, Apple + Red appeared 2 times, but on 3/8/2013, Pear + Green appeared 2 times and Apple + Red only appeared once.
Is it also possible to organize data by weeks or months this way? (During the month of January, I got 20 Apple + Red "pairs"
Let me know if anything was unclear in what I was asking
Thanks for your help!!!!
Add a new column to your data, which concatenates your data (ideally with delimiters to avoid value clashes) e.g. In Col D1 put formula
=A1&"|"&B1&"|"&C1
Give it a heading of Vals, and then create your pivot table from all the data
As an example I created this sample data which has 2 employees, Fred & Bill and a number of rows for each on 2 days. For 3-Jul, both Fred and Bill appear 3 times, but on 4-Jul Fred appears once and Bill 5 times.
My pivot table shows this result (which is hopefully what you're after)
EDIT :
For your situation, you probably need two extra columns, one called 'Pair Name' which concatenates B & C, and another called 'Pairs' which concatenates A, B & C.
Then in your pivot table you can drag 'Pair Name' into the Column Labels, and 'Pairs' into the Sum of Values.

How to merge and sum 2 arrays using excel?

Given a .csv data file as follows
12,green orange
1,good egg
...
5,green orange
I want to sum-up the first column elements if the second column element is the same. Given the example above, now we should have
17,green orange
1,good egg
...
What is the easiest way to do this?
A good option would be to use a Pivot Table (this is practically what they are designed for).
In your case, look into the SUMIF formula - link as it doesn't seem you will need such advanced functionlaity.
Copy the list of "keys" (the items) into a separate worksheet and remove duplicates, then just setup SUMIF like:
key | total sum
green | = SUMIF(dataSheet!B:B, A2, dataSheet!A:A)
where you have this in a sheet, and dataSheet represents the CSV values you just imported.
Assuming you don't want to work with variables.
Count |Color
12 |Green
1 |Blue
5 |Green
7 |Green
3 |Blue
Sort the file by the value "Color"
Count |Color
1 |Blue
3 |Blue
12 |Green
7 |Green
5 |Green
Put Formula in cell C2 and paste down
=IF(B2=B1,(C1+A2),A2)
Harvest the sums at the end of each color (i.e. Blue = 4, Green = 24)

Resources