How to check multiple conditions for calculated fields in sharepoint - sharepoint

In a SharePoint calculated field how do I check two things?
I have the following which checks field Est OpMargin and if less than 20 sets field to BG but I would also if less than 17 set it to RG
=IF([Est OpMargin]<20,"BG","")

Nest the IFs:
=IF([Est OpMargin]<17, "RG", IF([Est OpMargin]<20,"RG","") )
In SharePoint 2007 and 2010 you can nest 7 levels deep, and 2013 and later you can next 19 levels.

The Formula below for your reference:
=IF(And([Est OpMargin]>=17,[Est OpMargin]<20),"BG",IF([Est OpMargin]<17, "RG",""))

Related

Find Size / Length of text in SharePoint Workflow 2013

How to find size / length / number of characters in a text based column through SharePoint Designer Workflow?
An easy way: you can create a calculated column in your list and use the following formula to find the length of your column(Title):
=LEN([Title])
Then you use the calculated column in your workflow based on your requirement.

Is there a way of putting two pivot tables together?

So I've got two tables - one that hold premium data for insureds and one that holds claims data for insureds.
The commonality between them is a Deal number (D #).
On the premium table each Deal may have several layers though, so you could have Deal 1234 Layer 1 as this table shows (note deal # 11517 which has two layers):
D # Layer Annual Premium
3414 1 $320,000
9742 1 $632,454
16126 1 $675,000
21795 1 $2,100,000
5233 1 $165,756
5849 3 $611,538
23785 1 $1,770,833
11517 1 $840,000
11517 2 $135,400 *****
Then you have the claims table which looks like this (note deal 11517 is only listed once, but it's very possible for each deal to have multiple claims - see: 16535):
Deal Yr D# Paid Indemnity Paid Expense Incurred
2007 16535 $2,375,000 $162,634 $2,537,634
2007 16535 $7,125,000 $- $7,125,000
2006 10194 $3,839,575 $66,967 $3,906,541
2006 11517 $685,940 $124,139 $810,079
2006 13465 $2,126,242 $- $2,126,242
2006 11412 $10,000,000 $15,709 $10,015,709
2006 12313 $85,525 $- $85,525
2006 13688 $6,216,817 $100,576 $6,317,393
2006 13942 $236,669 $17,317 $253,986
So the question is, how do I put these table together without duplication. I've tried doing a vlookup on deal # but I end up getting duplicate claims figures for deals with multiple layers, or I get multiple premium figures if I go the other way.
I've tried making a premium table pivot to get a rolled up premium per deal # and a claims pivot to get a rolled up claims figure for deal #, but I don't know how to get them both on the same sheet... any thoughts?
Try this. Copy and paste your Claims table and then go choose Remove Duplicates under the Data tab. Choose the D# column only. This will give you a table with unique deal numbers.
Now delete the other columns and replace them with SUMIFS formulas. E.g.
=SUMIFS(Claims[Paid Indemnity],Claims[D '#],[#[D '#]])
=SUMIFS(Claims[Paid Expense],Claims[D '#],[#[D '#]])
=SUMIFS(Claims[Incurred],Claims[D '#],[#[D '#]])
Add one more column for the Annual Premium and use the appropriate formula:
=SUMIFS(Premiums[Annual Premium],Premiums[D '#],[D '#])
If you want to connect these tables and use them in pivot tables, then create a table with just the unique deal numbers and then load all three tables into your data model and create relationships like this:

EXCEL - IF multiple strings in a range of cells

Server Type Count
Enterprise 3
Standard 24
Enterprise Core 6
In Excel, I am looking for to check if server type (A2-A5) contains both 'Enterprise' and 'Enterprise Core' or just 'Enterprise'. If it contains both, then add the two numbers together, otherwise, just display the number for 'Enterprise'.
Perhaps just this:
=SUMIF(A:A,"Enterprise",B:B)+SUMIF(A:A,"Enterprise Core",B:B)
If it doesn't have both .. then it'll only find one to add ..
=SUMIF(A2:A5,"Enterprise*",B2:B5)
You can use the asterisk as a wildcard in sumif & countif.

Filtering a PivotTable by Boolean

The source data for my Excel PivotTable looks like the following (this is a simplification):
id name score
1 john 15
2 james 2
3 pat 14
4 jake 12
...
I have a PivotTable that uses this as a data source. Now, what I want to do is have the PivotTable only consider entries if their id is less than 100. This is theoretically achievable by having a Report Filter on id, and de-selecting any number greater than 100. But that's rather absurd.
How can I filter out data using a Boolean constraint? I've tried various methods, none of which worked. It seems like calculated fields are the key, but it doesn't seem possible to create a filter on calculated fields.
I'm using Excel 2011 for Mac, if that makes a difference. I'm a programmer, but I've never programmed in Excel, so if that's the solution, I'd request baby steps. :) Thank you!
AFAIK, In Excel 2011, you cannot use a report filter to apply any kind of filter. You have to manually check/uncheck the values that you want or don't want.
The alternative that I can think of is to insert a column before your data and enter the formula
=If(B2<100,TRUE,FALSE)
and copy it down using Autofill. (See screenshot below)
Now create a pivot and put the field "Less Than 100" in the report filter and simply select TRUE (See screenshot below)
If you don't want to go down that path then move the ID field to ROW LABEL from REPORT FILTER where you can use a filter.
A Report Filter is exactly what I would do, but rather than manually de-selecting the fields as you suggest you would do I would apply a Label filter to be less than the cut-off point, which in your example is 100.
I haven't used Excel on Mac, but on Windows on the PivotTable Field List, to the right of the id field click the little black arrow, and select Label Filters -> Less Than and then enter 100 in the dialogue that pops up.
Given the inherent value of PivotTables is the ability to apply filters exactly for this sort of scenario I don't think I'd do anything more complicated.

Filtering a view in SharePoint list based on a year

I'm using SharePoint 2010.
I want to create new view for my list. The list contains a column called Year, which is a number and contains, as name suggests, year. Eg.:
2012
2011
2010
2009
I would like create a view, where I would display only last 3 years. Under creating new view, I go to Filter, choose Show items only when the following is true:, pick column Year and... this is where I get lost.
How to write a condition, that a number should be greater that current year minus 3? I tried
[Year]-3
but this obviously couldn't be so simple. Please help me write this condition.
[Today] returns the current date so you can use the following formula:
[Year] > YEAR([Today])-3

Resources