Impact ranking in Excel - excel

I have a table with name, volumes processed and accuracy percentage. I want to calculate who has more impact overall on my business based on those two data points. I tried SUMPRODUCT by giving 50 - 50 weight-age for both data points equally but I didn't get good result. Any other method I can use to know the impact/ranking?
+------+--------+----------+
| Name | Volume | Accuracy |
+------+--------+----------+
| ABC | 251 | 52.99% |
| DEF | 240 | 70.00% |
| FGH | 230 | 74.35% |
| IJK | 137 | 84.67% |
| LMN | 136 | 56.62% |
| OPQ | 135 | 75.56% |
| RST | 128 | 60.16% |
| UVW | 121 | 70.25% |
| XYZ | 120 | 68.33% |
| AJK | 115 | 35.00% |
| LOP | 113 | 100.00% |
+------+--------+----------+

I'm afraid nobody here will be able to tell you what the business rules are for your business.
One approach might be to multiply volume by accuracy, then rank it, either with a formula or with conditional formatting color scales.
Depending on your business logic, you may want to put more weight on either volume or accuracy, so you may want to raise one value to the power of 2 before multiplying it with the other.
The technique is "use a formula to calculate the weighting". What that formula is will depend on your business logic. The following screenshot shows a weighting formula with simple multiplication, conditionally formatted with color scales and a rank formula in the next column.

Related

Sum sublevel calculations in DAX - Power Pivot

I have two levels of calculations: Region (upper level) and City (lower level).
| DATE_1 | REGION_1 | city_1 | 1560 |
| DATE_2 | REGION_1 | city_2 | 1234 |
| DATE_2 | REGION_1 | city_3 | 245 |
| DATE_3 | REGION_1 | city_2 | 2345 |
| DATE_2 | REGION_1 | city_1 | 654 |
On lower city level i use formula to calculate statistical sample size based on total orders made in a city.
On upper Regional level i DO NOT need to calculate the formula (sample size) i just need to sum the calculations from lower level.
Expected output:
| Region | 1119 |
| city_1 | 384 |
| city_2 | 370 |
| city_3 | 365 |
So in Pivot table i SUM sales for each City and then based on total sales in that city i calculate Statistically significant sample size.
But on Regional level in pivot table i need to SUM those Sample sizes.
I tried using SUMX but results dont work fine (i guess i m not fully getting the sense on SUMX).
Also i feel like using GROUPBY (or some other way to precompile table) and then SUMMING the results from lower level.

Sum if cells contain a range of multiple comma separated values (From another cell)

I have a list of attacks together with powers. I want to get the total sum of all powers which matches multiple comma separated values in another cell.
This is how my first sheet looks like:
Sheet 1
| Attack | Power |
|:---------------------|:--------------|
| nuke | 300 |
| nuke and laser | 500 |
| megalasernuke | 1000 |
| fist | 10 |
| weak fist and bow | 50 |
| supreme fist and bow | 100 |
Sheet 2
Using =SUMIF('Sheet1'!A:A;"*"&A2&"*";'Sheet1'!B:B) in column B, my second sheet can return the sum of all power containing one value:
| Attack | Sum of Power |
|:---------------------|:--------------|
| nuke | 1800 |
| fist | 160 |
I want to be able to sum if the cells in Sheet1 contains multiple comma separated values (all of them), resulting in the following:
| Attack | Sum of Power |
|:---------------------|:--------------|
| nuke,laser | 1500 |
| fist,bow | 150 |
| fist,bow,nuke | 0 |
| fist | 160 |
Is this possible to do without custom excel scripts?
it is not pretty but I can't figure another method, as you want to iterate twice:
=SUMPRODUCT(ISNUMBER(SEARCH(TRIM(MID(SUBSTITUTE(D2,",",REPT(" ",99)),1,99)),$A$2:$A$7))*ISNUMBER(SEARCH(TRIM(MID(SUBSTITUTE(D2,",",REPT(" ",99)),99,99)),$A$2:$A$7))*ISNUMBER(SEARCH(TRIM(MID(SUBSTITUTE(D2,",",REPT(" ",99)),198,99)),$A$2:$A$7))*$B$2:$B$7)
This only works up to three comma separated values.

Divide two "Calculated Values" within Spofire Graphical Table

I have a spotfire question. Is it possible to divide two "calculated value" columns in a "graphical table".
I have a Count([Type]) calculated value. I then limit the data within the second calculated value to arrive at a different number of Count[Type].
I would like to divide the two in a third calculated value column.
ie.
Calculated value column 1:
Count([Type]) = 100 (NOT LIMITED)
Calculated value column 2:
Count([Type]) = 50 (Limited to [Type]="Good")
Now I would like to say 50/100 = 0.5 in the third calculated value column.
If it is possible to do this all within one calculated column value that is even better. Graphical Tables do not let you have if statements in the custom expression, the only way is to limit data. So I am struggling, any help is appreciated.
Graphical tables do allow IF() in custom expressions. In order to accomplish this you are going to have to move your logic away from the Limit Data Using Expressions and into your expression directly. Here should be your three Axes expressions:
Count([Type])
Count(If([Type]="Good",[Type]))
Count(If([Type]="Good",[Type])) / Count([Type])
Data Set
+----+------+
| ID | Type |
+----+------+
| 1 | Good |
| 1 | Good |
| 1 | Good |
| 1 | Good |
| 1 | Good |
| 1 | Bad |
| 1 | Bad |
| 1 | Bad |
| 1 | Bad |
| 2 | Good |
| 2 | Good |
| 2 | Good |
| 2 | Good |
| 2 | Bad |
| 2 | Bad |
| 2 | Bad |
| 2 | Bad |
+----+------+
Results

Using #wip to skip certain data lines

So I am wondering if there is a way to skip certain rows for a cucumber data table. Lets say given this example (taken from cucumbers website)
Scenario Outline: feeding a suckler cow
Given the cow weighs <weight> kg
When we calculate the feeding requirements
Then the energy should be <energy> MJ
And the protein should be <protein> kg
Examples:
| weight | energy | protein |
| 450 | 26500 | 215 |
| 500 | 29500 | 245 |
| 575 | 31500 | 255 |
| 600 | 37000 | 305 |
I want to only skip the 2nd data line (weight:500..). Is this possible? If currently not, where can I find the cucumber tags and add my own custom ones? I would love for a soltion like #wipR2 #wipR4 where R2 and R4 mean row 2 and 4.
You can do this by splitting up your examples table into two and using #wip tag on one of them. Then run the test with the negate wip tag - ~#wip in 'tags' options to filter in cucumberoptions.
Examples:
| weight | energy | protein |
| 450 | 26500 | 215 |
| 575 | 31500 | 255 |
| 600 | 37000 | 305 |
#wip
Examples:
| weight | energy | protein |
| 500 | 29500 | 245 |

DAX Cumulative Total With Date Filters

I am trying to calculate a running total where orders are only valid during a certain date range. Each order has a value, a start date and an end date. I want to calculate the cumulative sum of the order's values only during the dates between an order's start date and end date.
I've read over this article on cumulative totals and have an equation for the running total but I can't figure out how to filter the equation so that it filter's out an order once the date table is past the order's End Date. The current measure I have is Cumulative Value:=CALCULATE(SUM(Orders[Vaue]), FILTER(ALL('Date'), [Date] <= MAX([Date]))) and I want to add a filter that filters out any orders with an end date past the current date row, similar to this Filter('Order', 'Orders'[Order_End_Date] < 'Date'[Date]). When I try to add this filter though I get an error since 'Date'[Date] is not used in any aggregation.
Below is the data model that I am using and a link to the Excel File with the data model.
The sample Data:
+-----------+
| Date |
+-----------+
| 1/1/2015 |
| 1/2/2015 |
| 1/3/2015 |
| 1/4/2015 |
| 1/5/2015 |
| 1/6/2015 |
| 1/7/2015 |
| 1/8/2015 |
| 1/9/2015 |
| 1/10/2015 |
+-----------+
+----------+------+------------------+----------------+
| Order_Id | Vaue | Order_Start_Date | Order_End_Date |
+----------+------+------------------+----------------+
| 1 | 1 | 1/1/2015 | 1/3/2015 |
| 2 | 3 | 1/2/2015 | |
| 3 | 6 | 1/3/2015 | 1/7/2015 |
| 4 | 7 | 1/5/2015 | |
+----------+------+------------------+----------------+
And the output of the current measure I have and what the correct measure's output should be.
+-----------+-----------------+--------------------------+
| Date | Current Measure | Desired Measure's Output |
+-----------+-----------------+--------------------------+
| 1/1/2015 | 1 | 1 |
| 1/2/2015 | 4 | 4 |
| 1/3/2015 | 10 | 9 |
| 1/4/2015 | 10 | 9 |
| 1/5/2015 | 17 | 16 |
| 1/6/2015 | 17 | 16 |
| 1/7/2015 | 17 | 10 |
| 1/8/2015 | 17 | 10 |
| 1/9/2015 | 17 | 10 |
| 1/10/2015 | 17 | 10 |
+-----------+-----------------+--------------------------+
Cumulative Value2:=CALCULATE(
SUM(Orders[Vaue])
,FILTER(
VALUES(Orders[Order_Start_Date])
,Orders[Order_Start_Date] <= MAX('Date'[Date])
)
,FILTER(
VALUES(Orders[Order_End_Date])
,ISBLANK(Orders[Order_End_Date])
|| Orders[Order_End_Date] >= MAX('Date'[Date])
)
)
Model Diagram (note I took out your date relation - for the limited use case you've provided, it only makes things more complicated):
Note: I will refer to function arguments positionally, with the first argument represented by (1).
So, what we're doing is similar to what you were trying. We've got two FILTER()s, each as an argument to our CALCULATE(). CALCULATE() combines its arguments (2)-(n) in a logical and.
The first FILTER() does essentially what you were already doing, except we are filtering the distinct values of the [Order_Start_Date], comparing them against the current filter context of the pivot table.
The second FILTER() loops over the distinct values of [Order_End_Date], checking two conditions combined in a logical or. We must handle the case of a BLANK [Order_End_Date]. This BLANK is normally implicitly converted to 0 == 1899-12-30, which is less than any date we're considering. In the case of a BLANK, we get a true value from ISBLANK() and the row is returned as a part of FILTER()'s resultset. The other test is simply checking that [Order_End_Date] is greater than the current filter context date in the pivot.
What you are looking for is often called the "event in progress" problem. Here are some posts that will help you to solve your problem.
a solid summary of the problem
a special case
guess this will help on first sight
if you can't get enough - read the complete white paper
I hope this helps.
-Tom

Resources