Forum Discussion
Creating a new column if values in column 1 = column 2
- 10 years ago
if you are doing this in Power Query then
this should do it
=if [usertype]="caregiver" then [Fullname] else ""
if you are creating a calculated column then its
Caregiver = if(users[UserType]="caregiver",users[Fullname],BLANK())
The first part of an IF is to check the logic so it checks to see if the first expression is true or false
then the second part is what is returned if its TRUE
and the last if it is false
You're right, I am trying to show for any row who is the caregiver and who is the client.
This is what I would like ->
Cool,
In order to get to the stage where you can match up a Client to the Caregiver, you will need something in your base table that actually shows this relationship.
Just looking at the columns [Full Name] , [User Type]
We dont have any information to say that a Caregiver has a relationship to a client or vice versa.
Normally I would expect a table to look bit like this (at the minimum)
[Id] , [Full Name], [User Type], [Assgined Carer Id]
Other questions come to mind, like would you have a situation where you might have two carers associated to a single client?
would you have a change in carer and how do you keep track of the change?
- android110 years ago
Post Patron
Hi,
I have two tables, Users & Service Task. Users has 4 columns -> Fullname (a mix of carers & clients) , UserType(Client or Caregiver) and UserTypeID (1 = Caregiver, 2= Client) and UserID
Service Task table contains CareGiverID & Client ID
- android1110 years agoRegular Visitor
I would have 2 or more carers assigned to a client. As for change of UserType, once someone
is a Caregiver, they are always a Carer. Same for Client.
- Neuro8110 years ago
Helper I
sorry Ive only had a chance to get back to you now
my first reaction would be to create two tables out of your users
one for Caregivers and one for users
to do that from your users table create a reference
give it a new name eg clients and filter out all the caregiversnow create relationships using the userid and the client id / caregiver ids
and you have a small model which can refer to each other, this should give you most of what you are looking to do, let me know if you have any issues and I can help you out