Tableau - Filter Results Based on Name - filter

I have a view with calibration data where hosts create a calibration session, provide scores, then open up the sessions for others to join and score and see how they compare.
Example of my data:
Date
SessionID
Participant Type
Name
Score
New Calculated Field
2022-04-01
250
Host
John Smith
A
John Smith
2022-04-02
250
Participant
Jane Doe
A
John Smith
2022-04-04
250
Participant
Ed Jones
B
John Smith
I'm trying to create a field in Tableau where users can filter to/select the Host's name and see the results of all participants for that SessionID. In the example above, they would select "John Smith" and see the data for John Smith, Jane Doe, and Ed Jones.
Based on research, I believe I need to use FIXED, but am not sure how to write that calculation. Any assistance would be appreciated!

Related

VLookup with hyperlinked values - GoogleSheets

I have two google sheets. the first sheet shows people and hours worked
the second sheet shows people and projects worked.
I want to pull in the projects from sheet two into sheet one so that I have people, projects, hours worked in one sheet.
Sheet one is something like below
Person
Hours
Sam
12
Jen
5
James
6.2
Sue
4
Sheet two is something like below
Id
Person
Project
123
James
Something
569
Jen
abc
25
Sue
Test
456
Sam
best_Wing
The result I am looking for is
Person
project
Hours
Jen
abc
5
Sam
Best_wing
12
James
Something
6.5
Sue
Test
4
The names in the Person column on sheet 1 are hyperlinked. So the name is displayed in the Person Column, but when clicked on links to a different page.
I was trying to do a VLOOKUP, but I keep getting a formula parse error, I used the =TO_TEXT(A3:A) to pull the text from the hyperlinked field and use that as a Filter for the second sheet, but I am doing something wrong, somewhere.
=ARRAYFORMULA(IFNA(VLOOKUP(TO_TEXT(A3:A), FILTER({sheet2!$B$2:B, sheet2!$C$2:C}, sheet2!$C$2:C), 3, 0)))

Customize order confirmation email in SagePay

We need to customize SagePay order confirmation mail.
We assigned 'eMailMessage'=><p>test</p>
Your order from abc has been successful.
The unique reference for this transaction is: 917-260650635
Dear Vijay V,
Thank you for your order. Your payment has been processed successfully.
test
Please quote your order number 917-260650635 in all correspondence with either abc or Sage Pay.
Bullet Point Order total:1,200.00 GBP
Card used:Sagepay Test Visa, United Kingdom - Visa - XXXX XXXX XXXX 5559 - Attempt:1
Bullet Point You bought:917-260650635
Description Quantity Item Value Item Tax Item Total Line Total
abc12 1 1200.000000 0.000000 1200.000000 1200.00
How we can customize complete template?
Edit:
We want to customize entire layout with Logo and other deatils:
Dear Xxxx Xxxxxx,
Thank you for your order with DDDD .
Your payment has been processed successfully.
The unique reference for this payment is XXX-XXXXXXXXXX, please quote this in all correspondence with either ABC or Sage Pay.
Order Total: £xxx.xx
Card Used : Name, Card Type , Last Four Digits XXXX
Your Order: Order Reference#
Sorry. You can't - you're limited to inserting the contents of the emailMessage field. You'll need to implement some sort of customer notification yourself, if you want to change the email styling / contents.

Algorithm for setting up new groups with randomized employees in a company for mixed group lunch

Could someone please help suggest an algorithm for the following problem?
Problem statement for the randomizer script
For mixed group lunches, set up new groups with randomized employees in a company. Set up groups with employees who have not recently had lunch together with USING THE HISTORY LUNCH DATA BELOW.
INPUT data
List of current employee names
History data from the past mixed group lunches. Please look at the sample data at the end below.
OUTPUT data from the randomizer script
New groups with randomized employees. Set up groups with people who have not had lunch together with RECENTLY.
Assumptions
The group sizes in the past varied. To simplify the problem, the future lunches will be groups of 5 people
Need to consider new employees who just joined and disregard the employees who left the company.
HISTORY LUNCH DATA from the past mixed group lunches
1/13/2012 -------------
Group A
Jason
James
Kimbery
Joseph
Michael
Group B
Lisa
Kelly
Matthew
Amy
Group C
...
Group …
...
Group X
...
3/23/2013 ————————-----------------------------
Group A
Kelly
Anthony
Tracy
Group B
Susan
Scott
Bryan
Joseph
...
Group Z
...
7/01/2014 ————————-----------------------------
Group A
Jon Michael Mia
Group B
...
Group Y
...
8/10/2014 ————————-----------------------------
Group A
...
Group B
...
Group S
...
———————————————————

Rendering a three level data hierarchy into an HTML table with ASP.NET

Say I had some Airport, Aeroplane, Passenger and Seat classes in C#. Passenger has the id of an Aeroplane and Aeroplane has the id of an Airport. Passenger also has the id of a Seat.
How would I write a linq query to build them into a hierarchy then render them into an HTML table?
I need it to look some like:
1 2 3
Gatwick
747 July Kim Ben
767 Neal Toby
A380 Becky
Hong Kong
747 Gary Steve Gary
MiG-35 Ted
etc..
(Seat numbers are along the top)
I've been scratching my head in front of LinqPad for ages but I can only get one level in the hierarchy. I guess I may need to use nested GridViews or maybe write a custom control to render the resulting object but am not sure of the best approch.
Ideally I'd like to get all the data with a single query (a previous programmer has done it using one query per cell and the page takes a minute to load!)
Many thanks
This would require 2 LINQ queries:
You have to group by seat number (or get seat numbers using .Distinct()). Use this to output the columns;
Then group by airport, then airplane, then in each airplane grouping, you have the passengers - you .Join() them with your seats collection.
passengers
.GroupBy(p => p.Aeroplane)
.GroupBy(p => p.Airport)
.Join(seats, p=>p.Seat, s=>s, (p,s)=>new { Passenger = p, Seat = seat })
That will give you an array of passengers and their respective seat in each aeroplane and then in each airport.

One-Many and One-One relationship using LINQ to SQL on Stored procedure

Lets say I had Three tables Customer(ID,Name),CustomerAddress(ID,Address1,Address2),Phone(ID,PhoneNumber). So in this,Each Customer has Multiple Addresses(one-Many relation ship) and Each Address has one Phone (one-one relation ship). I had a stored procedure which returns all the data in below order
ID Name Address PhoneNumber
1001 John MD 1234
1001 John VA 1231
1001 John WA 1232
1002 Mary NJ 0231
1002 Mary NY 0232
1002 Mary OR 0032
Right now, after getting above data i am sitting in a for each loop and filling my data objects.But, I want fill those Data objects dynamically using LINQ-SQL. I saw this article which exactly does the same thing http://www.codeproject.com/KB/linq/OneManyandOneOneLINQ.aspx?fid=1543095&select=3878390&fr=1&df=90&mpp=25&noise=3&sort=Position&view=Quick.
The only difference is i am running stored procedure to get data.
So, Any one knows hoe to fill these entity classes w/ stored procedure?
Any input would be really help full.

Resources