I am trying to create a Power View report tiled by KPIs, is this possible?
An example of my raw data:
Company ID Employee ID Measure numerator denominator
1 01 1 2 5
2 04 1 3 6
3 02 1 0 5
4 03 1 1 2
1 01 2 4 4
2 04 2 2 3
2 06 2 0 6
4 01 2 1 4
I have created a calculated column in Power Pivot using the following DAX function:
RATE:=[numerator]/[denominator]
From this, I want to create KPIs for each measure (each measure has different targets), and use these KPIs as tiles in a Power View report filtered by Company ID and/or Employee ID.
Can this be done?
You cannot tile by KPI. You KPI has to be a measure and you cannot tile by a measure. You can tile by a calculated column or by any original field in your dataset. So you can drop RATE into a TILE BY box.
To use the Measure column or a KPI type icon as the Tile field the best approach might be to use an image for your measure column. See more on including images in Power View here: https://support.office.com/en-ca/article/Images-in-Power-View-84e91b90-b1da-4913-83d6-beada5591fce?ui=en-US&rs=en-CA&ad=CA
Related
Note, I have edited my original question to clarify my problem:
As the title suggests, I am looking for a way to combine the SUMPRODUCT functionalities with an INDEX and MATCH formula, but if a better approach exists to help solve the problem below I am also open to it.
In the below example, imagine that the tables are on different sheets. I have a report that has the sales of each ID in the rows and each month in the columns (first table). Unfortunately, the report only has IDs and not the region they belong to, but I do have a look up table which labels each ID with their respective region (second table):
A
B
C
D
1
ID
January
February
March
2
1
10
5
20
3
3
5
5
10
4
7
0
10
5
5
14
10
25
5
6
25
5
10
10
7
27
10
10
10
8
44
5
5
5
A
B
1
ID
Region
2
1
East
3
3
East
4
7
Central
5
14
Central
6
25
Central
7
27
West
8
44
West
My goal is to be able to aggregate the sales by region as per the result below. However I would only like to show sales data that belong to the month that is shown in cell D2.
Goal:
A
B
C
D
1
Region
Sales
February
2
East
10
3
Central
45
4
West
15
I have used the INDEX and MATCH combination to return a single value, but not sure how I can return multiple values with it and aggregate them at the same time. Any insight would be appreciated!
You may just use:
=SUMPRODUCT((Sheet1!B$1:D$1=D$1)*(Sheet1!H$2:H$8=A2),Sheet1!B2:D8)
Remember, SUMPRODUCT() could be quite heavy processing huge data, therefor to combine INDEX() and MATCH() is not a bad idea, but let's do it the other way around and nest the latter two into SUMPRODUCT() instead =):
=SUMPRODUCT(INDEX(Sheet1!B$2:D$8,0,MATCH(D$2,Sheet1!B$1:D$1,0))*(Sheet1!H$2:H$8=A2))
Another option using SUMIF+INDEX+MATCH function as in
In "Sheet2" B2, copied down :
=SUMIF(Sheet1!H:H,A2,INDEX(Sheet1!B$1:D$1,MATCH(D$2,Sheet1!B$1:D$1,0)))
I am not an excel expert, but I have been searching for days on a method to repeatably pull non-zero entries from a 2 column table. The reason it has to be repeatable (and hence can't use filtering) is that I have about 50 pie charts with different data sets I need to create so that the charts only have slices that are greater than zero.
Here is an example of the source data, which I have pulled from a few thousand rows of raw entries
| Possession type observed | Count |
| ------------------------------|--------
|Handheld device 27
|Backback 53
|Baby stroller 5
|Walking aid 1
|Headphones 5
|Wheelchair or mobility device 2
|umbrella 1
|Bundle buggy 0
|book 0
|DVD 1
|purse & holding keys 0
|handbag 1
|clutch wallet 0
|white paper 0
|grocery bag 0
|purse 0
|holding newspaper 0
|None of these 83
I haven't found a satisfactory solution to build a pie chart out of the data above that removes zeros, so I went ahead and tried to create a summary chart only listing values > zero.
But my problem is that I can pull non-zero entries out, when it comes to the entries with the same value (e.g baby stroller and headphones both have a value of 5), I can't grab baby stroller, then headphones.
Ideally I would like the summary chart to look like this:
| Possession type observed | Count |
| ------------------------------|--------
|Handheld device 27
|Backback 53
|Baby stroller 5
|Walking aid 1
|Headphones 5
|Wheelchair or mobility device 2
|umbrella 1
|DVD 1
|handbag 1
|None of these 83
Thanks so much in advance for any assistance!
To get the desired output follow these steps:
Step1: Select the data
Step2: Choose pivot chart from insert tab,follow the wizard to create the pivot table and chart where you want them or hit Alt + D + P and 3 times enter
Step3: Change the chart type to pie from the Design tab
Step4: Drag the 'Possession type observed' field to the 'Axis' area
Step5: Drag the 'Count' field to the 'value' area as well as 'report filter' area
Step6: Filter out 0 using the dropdown on the chart
I'm trying to create a calculated field in my pivot table and am having issues getting the calculation right.
Consider the following "raw" pivot table:
I tried to create a calculated field that showed the net availability for an application (general formula: (Availability-Downtime)/Availability). In the Calculated Field menu, I did the following:
where the Formula is =(AVERAGE(Availability)-SUM(Downtime))/AVERAGE(Availability). The result is here:
Clearly the uptime for Application A in 2012 should be (1000-35)/1000 = 96.5%, but it's not. Where am I going wrong, here?
Here is my raw data (Availability is the same for each value of Application... these values were merged from another table via VLOOKUP):
ID Application Downtime Year Availability
1 A 15 2012 1000
2 A 20 2012 1000
3 A 12 2013 1000
4 A 0 2012 1000
5 B 12 2012 1200
6 B 14 2012 1200
7 B 23 2012 1200
8 B 90 2013 1200
9 C 23 2012 1100
10 C 32 2013 1100
11 C 34 2013 1100
12 C 12 2013 1100
I believe that it's the aggregation on top that is causing the unexpected result.
For example, where as you are expecting:
(AVERAGE(Availability)-SUM(Downtime))/AVERAGE(Availability)
What effectively is being calculated is:
(SUM(Availability)-SUM(Downtime))/SUM(Availability)
(or average depending how the field in the pivot table is aggregated)
To get the the calculation that you are after you could use a helper column populated with 1's to calculate the average availability, example below:
(Availability/helper-Downtime)/(Availability/helper)
(Then sum this in the pivot table)
I'm trying to Average aggregated(SUM) values, but my expression keeps doing weighted averages over the whole data set.
Table Structure
REGION SITE_ID MONTH QUANTITY
A 1 01 5
A 1 02 6
A 2 01 4
B 3 01 10
B 3 02 12
Expression
Avg(
Sum([quantity]) over (All([region]))/
UniqueCount([site_id]) over (All([region]))/
UniqueCount([month]) over (All([region]))
) over (All([region]))
To Clarify, I want to average A and B's Monthly Qty per Site
But I keep getting total qty divided by total no of site_ids divided by months
This really depends on where you are going to use it and what the REAL data looks like. This should get you started. Insert this calculated column.
SUM([QUANTITY]) OVER (Intersect([REGION],[MONTH])) / UniqueCount([REGION]) AS [AvgOverRegionByMonth]
This could be inaccurate depending on how the rest of your data looks like. You can also accomplish this in a cross table. The expressions for the Sum and Avg on the example below are as follows:
Sum([QUANTITY]) as [Sum], Sum([QUANTITY]) / Count([REGION]) as [Average]
EDIT
In order to ONLY get the average over the months, use this forumla:
AVG([QUANTITY]) OVER ([MONTH]) as [AvgOverMonth]
Here is what your data will look like:
I have a data file of approximately 5000 repeated measures organized with rows containing IDs and repeated measures on weight, BMI, etc for children. I would like to find the maximum value of one variable (BMI) for each individual (out of up to 9 records). How can I do a lookup on multiple rows for each ID and return the max of a value for each person?
A very abbreviated example is as follows:
HAVE:
ID Date BMI
1 1 20
1 2 18
1 3 24
2 4 23
2 5 19
2 6 17
3 7 25
3 8 18
3 9 21
WANT
ID Highest BMI Corresponding date
1 24 3
2 23 4
3 25 7
Alternatively if there is a way to do this in SPSS or JMP (I don't have access to SAS now), please let me know.
Thanks!
Melissa
You can do this easily in Excel in two parts
A PivotTable to extract the maxiumum BMI for each ID
matching the maximum BMI per ID to a date
Part 1 - PivotTable
Create a PivotTable with
A Row Label of ID
Values as Max of BMI
see below
Part 2 - matching the date
In the cell to the right of tge first BMI maximum, put this formula
=SUMPRODUCT(--($A$2:$A$10=B14),--($C$2:$C$10=C14),$B$2:$B$10)/SUMPRODUCT(--($A$2:$A$10=B14),--($C$2:$C$10=C14))
(ensure you re-map your ranges if they differ from this example)
This formula the record that matches the ID and Max BMI