Calculation from the merged cells - excel

From the table below, I wanted to calculate the average percentage of training. If the status starts with "3" show as 100, "2" show as 50, and "3" show as 0 and then calculate the average. The summary table doesn't include the subjects which are blank (highlighted in grey)
I am able to get the status calculation using the formula "=LET(_classes,FILTER('Content Tracker'!A3:A1048576,'Content Tracker'!A3:A1048576<>""),
_subjects,FILTER('Content Tracker'!B3:B1048576,'Content Tracker'!B3:B1048576<>""),
_trainings,FILTER('Content Tracker'!E3:G1048576,'Content Tracker'!B3:B1048576<>""),
_merge,HSTACK(SCAN(_subjects,_subjects,LAMBDA(x,y,IF(y="",x,y))),_trainings),
_uclasses,UNIQUE(INDEX(_merge,,1)),
_trainingonecomp,MAP(_uclasses,LAMBDA(x,SUM(--(x=INDEX(_merge,,1))*(INDEX(_merge,,2)<>0)IF(ISNUMBER(SEARCH("3",INDEX(_merge,,2))),100,IF(ISNUMBER(SEARCH("2",INDEX(_merge,,2))),50,0))))),
_trainingtwocomp,MAP(_uclasses,LAMBDA(x,SUM(--(x=INDEX(_merge,,1))(INDEX(_merge,,3)<>0)IF(ISNUMBER(SEARCH("3",INDEX(_merge,,3))),100,IF(ISNUMBER(SEARCH("2",INDEX(_merge,,3))),50,0))))),
_trainingthreecomp,MAP(_uclasses,LAMBDA(x,SUM(--(x=INDEX(_merge,,1))(INDEX(_merge,,4)<>0)*IF(ISNUMBER(SEARCH("3",INDEX(_merge,,4))),100,IF(ISNUMBER(SEARCH("2",INDEX(_merge,,2))),50,0))))),
_avg,AVERAGE(_trainingonecomp,_trainingtwocomp,_trainingthreecomp),
_output,VSTACK(HSTACK("classes","subjects","Training 1 Completed","Training 2 Completed","Training 3 Completed","Average"),HSTACK(_classes,_subjects,_trainingonecomp,_trainingtwocomp,_trainingthreecomp,_avg)),
_output)"
This is the output I got:
I am not able to remove the subjects (highlighted in yellow) with blank values in the source files, and the class and average columns throw some errors.
This is the result expected:
Can anyone assist me with this to achieve the expected result?

Related

Get a list from column 2 if column 1 contains a portion of text

I have 2 columns, (Reports and Data Names).
Reports Data Names
Report 1, Report 3 Total Number
Report 2, Report 3 Total Complete
Report 1, Report 2 Total Fails
I need a list of data names that are from "Report 1" without blank rows. I want to see for report 1:
Total Number
Total Fails
I want to see for report 3:
Total Number
Total Complete
I cant get the formula i have attached to search just want "report 1" and anything else, it only works if i use the entire string "Report1, Report3"
=INDEX('Data Points'!B:C,SMALL(IF('Data Points'!B:B="Report 1",ROW('Data Points'!B:B)-ROW(INDEX('Data Points'!B:B,1,1))+1),ROW()),2)
=Index(Range,Small(If(Range="Report1",Row(Range)-Row(Index(Range,1,1))+1),Row(),2)
The last Row() formula is used to start the Small Kth at 1
I think this is what you're looking for, entered as an array formula:
=INDEX('Data Points'!C:C,SMALL((IFERROR(SEARCH("Report 1",'Data Points'!$B$2:$B$4),0)>0)*ROW('Data Points'!$B$2:$B$4),COUNTIF('Data Points'!$B$2:$B$4,"*Report 1*")+ROW(A1)-1))

How to compare hours with numbers in excel?

I am making a task sheet for my students and I have written the following code:
=IF(J35-K35>5,"Task 1",IF(J35-K35>3,"Task 2",IF(J35-K35>2,"Task 3", IF(J35-K35>0,"Task 4",IF(K35-J35<1,"Task 5",IF(K35-J35<3,"task 6",IF(K35-J35>3,"Task 7")))))))
The cell K35 contains "Total hours worked" and
The cell J35 contains "Total hours required".
Their format is in [h]:mm
The problem I am facing here is that it is showing me output for only 2 conditions - for the one which is greater than 0 (Task 4) and the other which is less than 1 (task 5). None of the other conditions are getting executed. I need a way in which I can compare hours with numbers.
How can I solve this problem?
If the cells contain times, the calculation J35-K35 will return a number between 0 and 1 for a positive value, between -1 and 0 for a negative value. The formula will use the underlying values, not what they will look like if formatted as time.
The value of one hour, formatted as general is 0.041666667. You can either use that and its multiples in your formula or multiply the result of the subtraction by 24 to arrive at numbers where the part before the decimal point is the number of hours, so your formula could be
=IF((J35-K35)*24>5,"Task 1",IF((J35-K35)*24>3,"Task 2",IF((J35-K35)*24>2,"Task 3", IF((J35-K35)*24>0,"Task 4",IF((K35-J35)*24<1,"Task 5",IF((K35-J35)*24<3,"task 6",IF((K35-J35)*24>3,"Task 7")))))))

Excel 2010 Pivot Table issue

I have the below pivot table
Category Total Count(calculated value) # Completed Count(calculated value)
Red 38,357 18822
Blue 182 155
Green 7,153 4,761
I would not like to calculate a % of the two counts. So show the % of 18,822/38,357, etc. How would I go about getting this metric?
Insert a calculated Field. In the formula box divide by the true column name. So for instance if it's a calcululated value Count of "xx" exlcude the count of and use only the column name.

Excel IF OR Statement

I am having trouble determining the correct way to calculate a final rank order for four categories. Each of the four metrics make up a higher group. A Top 10 of each category is applied to the respective product to risk analysis.
CURRENT LOGIC - Assignment of 25% max per category.
Columns - Y4
Parts
0.25
25
=IF(L9=1,$Y$4,IF(L9=2,$Y$4*0.9, IF(L9=3,$Y$4*0.8, IF(L9=4,$Y$4*0.7, IF(L9=5,$Y$4*0.6, IF(L9=6,$Y$4*0.5, IF(L9=7,$Y$4*0.4, IF(L9=8,$Y$4*0.3, IF(L9=9,$Y$4*0.2, IF(L9=10,$Y$4*0.1,0))))))))))
DESIRED...
I would like to use a statement to determine three criteria in order to apply a score (1=100, 2=90, 3=80, etc..).
SUM the rank positions of each of the four categories-apply product rank ascending (not including NULL since it's not in the Top 10)
IF a product is identified in more than one metric-apply a significant contribution weight of (*.75),
IF a product has the number 1 rank in any of the four metrics-apply a score of (100).
Data - UPDATED EXAMPLE
(Product) Parts Labor Overhead External Final Score
"XYZ" 3 1 7 7 100
"ABC" NULL 6 NULL 2 100
"LMN" 4 NULL NULL NULL 70
This is way beyond my capability. ANY assistance is appreciated greatly!!!
Jim
I figured this is a good start and I can alter the weight as needed to reflect the reality of the situation.
=AVERAGE(G28:I28)+SUM(G28:I28)*0.25
However, I couldn't figure out how to put a cap on the score of no more than 100 points.
I am still unclear of what exactly you are attempting and if this will work, but how about this simple matrix using an array formula and some conditional formatting.
Array Formula in F2 (make sure to press Ctrl+Shift+Enter when exiting formula edit mode)
=MIN(100,SUM(IF(B2:E2<>"NULL",CHOOSE(B2:E2,100,90,80,70,60,50,40,30,20,10))))
Conditional Formatting defined as shown below.
Red = 100 value where it comes from a 1
Yellow = 100 value where it comes from more than 1 factor, but without a 1.

how to show 0 data point in visualization when data is missing in data table?

i have one visualization,
on x-axis i have months of date column,
on Y-axis i have unique count of issues.
i have 2 filters in text area,
when i am selecting some values in filter 1 or filter 2 than if count is not available for any month than i need 0 for that month.
Lets suppose i have 5 month(Jan to may) data in my data table, i selected 1 value from filter 1 and 1 value from filter 2, if that combination data is not available for march and April, than trend should show 0 count for march and April.
it is a trend line so if count is not available for any month for selected filters than it should show 0. any lead will help.
TIA
Go to the x-axis settings of your vizualization, click on settings next to your month variable and with the categorical options, choose show all values. If you have a bar chart it will show you the 0 values. In a line chart Spotfire will continue the line as if there are no missing values. In this case you need to add markers to your line.
1:

Resources