Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jrmaier
Helper IV
Helper IV

Need to look up which number to place in a Column based on the numbers from first column

We have a couple of different number ranges of Student ID's. They are have a User ID (Col. C) which is used as the key for imports into our Student Information System.

I am looking for help filling in the User_ID field (C). If the Student ID (Col. A) starts with a 2, then I need the number from the User ID Field (Col B). If the Student ID (A) number is already the same as the User ID (B) number then insert that into the User_ID field (column C)

 

Snag_198e6bec.png

1 ACCEPTED SOLUTION
mangaus1111
Solution Sage
Solution Sage

Hi @jrmaier ,

try this

Column = 
SWITCH(TRUE(),
    [Student ID] = [User ID],[Student ID],
    LEFT([Student ID],1) = "2", [User ID]
)

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
jrmaier
Helper IV
Helper IV

@mangaus1111 that worked. Thank you so much!!!

mangaus1111
Solution Sage
Solution Sage

Hi @jrmaier ,

try this

Column = 
SWITCH(TRUE(),
    [Student ID] = [User ID],[Student ID],
    LEFT([Student ID],1) = "2", [User ID]
)

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors