SharePoint Calculated Column - Get Dynamic Column ID - sharepoint

I have a number column called "Team Leader", "Process Lead", "Regional Manager"
I will get Team Leader Name, if "Team Leader" Column is Blank, then Get the Name of "Process Lead", if Both Column is Blank then Get the Name of "Regional Manager"
I also have a calculated column that looks to this column.
=IF(ISBLANK([Team Leader]),"",[Team Leader]),=IF(ISBLANK(["Process Lead]),"",[Process Lead])
This is where I am with my formula which doesn't work. Has anyone achieved this?


Either of these 2 should help you:
First, result in blank value if Regional Manager is not provided.
IF(ISBLANK([Test column1]),IF(ISBLANK([Test Column2]),IF(ISBLANK([Test Column3]),"",[Test Column3]),[Test Column2]),[Test column1])
Another one:
IF(ISBLANK([Test column1]),IF(ISBLANK([Test Column2]),IF(ISBLANK([Test Column3]),"",[Test Column3]),[Test Column2]),[Test column1])

Related

Tabulator 5.2 New editor List option/value

In the new tabulator v5.2, the editor "select" was changed to "list", I have this code that was working fine in v5.1 but stop working in the new version, I hope someone can help me figured out what do I need to change to make it work again with this new version of tabulator.
Ex: in my table there are two columns with select dropdown values, the second column is dependent on the first. So if I select "Sales" in the first column, in the same row on the second column it will only show a list of "services" that belongs to the "Sales" department and so on.
In the code linked below you can see that in the first column when I click in a row in the "Dept" column, a list of values shows up, and if I select the value "Sales" it change to option "1".
{title:"DEPT", field:"dept", width:90, hozAlign:"left", editor:"list", editorParams:{values: {1:"Sales",2:"Service",3:"Bodyshop",4:"Carwash"}}},
{title:"WORK Type", field:"service", editor:"list", editorParams:{values: serviceList}},
jsfiddle
You can use the built-in lookup formatter to do that:
columns:[
{title:"DEPT", field:"dept",
width:90, hozAlign:"left",
editor:"list",
editorParams:{
values: {1:"Sales",2:"Service",3:"Bodyshop",4:"Carwash"}
},
formatter:"lookup",
formatterParams:{
1:"Sales", 2:"Service", 3:"Bodyshop", 4:"Carwash"
}},
Passing the same object of editorParams into the formatterParams would do your job.
Working Demo: https://jsfiddle.net/Mahesh1312/rzbxvym7/5/
Hope it helps!

Create a table in a new sheet with data from two different tables in two different sheets in excel

I am new to Excel and is currently struggling to get intermediate formulas right.
Here is what I'm trying to achieve.
A) I have three sheets,
EMPLOYEE, 2. PROJECTS and 3. ENGAGEMENT
B) EMPLOYEE sheet contains information about an employee. Employee ID (EMP_ID) is generated from the name entered.
C) PROJECTS sheet contains information about the projects handled or being handled. Project ID is generated from the name of the project. Most important part is the column "Resource 1" through "Resource 20" for now. As of now, a project can have maximum of 20 resources allocated to it. One can select resources from the drop-down list.
What I am trying to achieve is,
On "ENGAGEMENT" sheet, all the projects where a resource is engaged needs to appear under "Project 1" through "Project 10" columns (assuming that a person can work on maximum of 10 projects).
I need to show stats for projects between START and END date in ENGAGEMENT sheet. However, this is not of highest priority.
Please note that, I want to achieve this with formulae only, not script or macro.
Please look at the attached screenshots and the sheet I've attached.
Thanks,
Dave
Screenshots and references can be downloaded from below given links.
[1]: https://i.stack.imgur.com/kTcjW.jpg
[2]: https://i.stack.imgur.com/yLyZI.jpg
[3]: https://i.stack.imgur.com/WeoTj.jpg
[4]: https://i.stack.imgur.com/LgDiW.jpg
[5]: https://docs.google.com/spreadsheets/d/1qikvz4X6bvKO8PyB_nrmZA64x6StUMlh/edit?usp=sharing&ouid=109764009612506156621&rtpof=true&sd=true
=ARRAYFORMULA(IFERROR(SPLIT(IFNA(VLOOKUP(TRIM(A3:A),
SPLIT(SUBSTITUTE(TRIM(FLATTEN(QUERY(QUERY(SPLIT(FLATTEN(QUERY(FLATTEN(IF(DAYS(
IF((PROJECTS!D2:D4="")*(PROJECTS!C2:C4<>""), TODAY(), PROJECTS!D2:D4), PROJECTS!C2:C4)>
SEQUENCE(1, 1000, ), ROW(PROJECTS!A2:A4)&"×"&PROJECTS!C2:C4+SEQUENCE(1, 1000, )+1, )),
"where Col1 is not null")&"×"&TRANSPOSE(QUERY(FLATTEN(
IF(PROJECTS!I2:4="",,ROW(PROJECTS!A2:A4)&"×"&PROJECTS!I2:4&"×"&PROJECTS!A2:A4)),
"where Col1 is not null"))), "×"), "select max(Col5) where Col1=Col3 "&
IF(D1="",," and Col2>="&VALUE(D1))&
IF(F1="",," and Col2<="&VALUE(F1))&
" group by Col5 pivot Col4"),,9^9))), " ", "×", 1), "×"), 2, 0)), " ")))

Load SharePoint Online list (with lookup columns) data from Excel via PowerQuery

I am new to power query but not to SharePoint.
What i want to do is show in excel what i have in SharePoint.
I have created a very trivial example.
This is my SharePoint list:
SharePoint List
I have 2 columns. Title (default column) and LU1 (a lookup column to an external list, multi value enabled)
Now, in Excel Data > Get Data > From Online Services > From SharePoint Online List
I tried in two possible ways:
1.0
2.0 (Beta)
1. 1.0
after connecting, choosing the LU1 list and selecting the two columns, I click on the icon at the top right of the OData_MD1 column.
After a few seconds of "loading column names" ... "no columns were found"
no columns were found
2.0 (Beta)
after connecting, choosing the LU1 list and selecting the two columns, I click on the icon at the top right of the MD1 colums.
Now i can "Expand to New Rows" or "Extract Values...".
If I Expand to New Rows
I Expand to New Rows
the column values go from "List" to "Record"
so I click again on the top ricght icon and I can select the field to show
Select lookupValue
but the rows with multiple values in the MD1 column are repeated, and this is not the result I want
splitted rows
So I Extract Values
I choose to separate the values with commas
comma separated
.... but I receive "Error" :(
Errors
what am I doing wrong?
many thanks in advance
I found the solution.
I changed the function from:
= Table.TransformColumns(#"Removed Other Columns", {"MD1", each Text.Combine(List.Transform(_, Text.From), ","), type text})
to:
= Table.TransformColumns(#"Removed Other Columns", {"MD1", each Text.Combine(List.Transform(, each Text.From([lookupValue])), ","), type text})
Of course it is strange that they put the functionality ready and selectable but then it goes wrong...

how to merge two rows into one in spotfire?

I am stuck at a point in spotfire wherein I need to transform the table (the one below)
ID First name last name
1 Mark
1 Taylor
2 Howard
2 Giblin
to (the table as shown here)
ID First Name Last Name
1 Mark Taylor
2 James Bond
Could someone please help me out. Thanks for the help in advance!
File > Add Data Tables
Add (button) > From Current Analysis > "Your Table Name"
Under transformations, Select "Calculate and Replace Column" > Add (button)
Then use this formula
Max([FirstName]) over ([ID]) as [FirstName]
Repeat the last step for you last name
Max([LastName]) over ([ID]) as [LastName]
Note, you could do this in a cross table or a calculated column as well. It will not remove the duplicate rows though, only fill in the gaps.

Excel Error Handling - Lookup and Return Employee ID

Request:
Please assist w\ formula logic to provide error handling and Vlookup functionality across two possible columns (within table array) and return employee ID (third column in array).
Goal:
Create an auto-populating attendance tracker that looks up the inputted phone number and returns their employee ID on an embedded "Roster" worksheet. Also, I am trying to give functionality for vlooking up across two phone numbers.
"Attendance Tracker" worksheet Table Layout: (emphasis in italics)
DATE | TIME | CALLER ID | TYPE | REASON | DETAILS | EMPLOYEE # | ETC...
Caller ID = Column D
Employee # = Column I
"Roster" worksheet table-array for VLOOKUP
Column H = "Contact Primary"
Column I = "Contact Secondary"
Column J = "Employee Number"
Primary Formula(s)
"First"=VLOOKUP(D2,Roster!H:J,3,0) <--- Looks up emp number against "Contact Primary"
"Second"=VLOOKUP(D2,Roster!H:J,2,0) <--- Looks up emp number against "Contact Secondary"
My Attempt
=IF(D2="","",IF(ISERROR(IF(ISERROR(VLOOKUP(First)),VLOOKUP(Second),VLOOKUP(First))),"Add # to Roster",VLOOKUP(FIRST))))
MY RESULTS
"Caller ID" left blank - Perfect! Top level if-statement fixes blanks.
"Caller ID" exists in "Contact Primary" Column - Perfect! Value Returns.
"Caller ID" exists in "Contact Secondary" Column - Oh No! "Add # to Roster" returns.
"Caller ID" DOES NOT exist in either "Contact Primary/Secondary" - Oh No! "Add # to Roster" returns.
I hope I explained that well enough. And thank you so much in advance if you are able to assist!
I suspect what you want may be:
=IF(D2="","",IF(AND(ISERROR(VLOOKUP(D2,Roster!H:J,3,0)),ISERROR(VLOOKUP(D2,Roster!I:J,2,0))),"Add # to Roster", IF(ISERROR(VLOOKUP(D2,Roster!H:J,3,0)),(VLOOKUP(D2,Roster!I:J,2,0)),(VLOOKUP(D2,Roster!H:J,3,0)))))

Resources