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
JCBI1023
Helper III
Helper III

If Statement Help

Hello Community,


Thank you for your help! This should be a quick one. 

 

I am working on an AR Aging report. I have a 'Cust. Name" column in Sheet1 and another sheet called "Collector". We have 3 collectors: Collector 1 is responsible for Cust. Names that start with a certain letter, Collector 2 is responsible for Cust. Names that start with a certain letter, and the same with Collector 3. 

 

Well, we have introduced a "Contractor". This Contractor is responsible for 3 specific Cust. Names.

 

Here is how I am assigning a "First Letter" to a Collector... Here's a screenshot of my "Collector" sheet.

Collector Sheet.png

 

Then a created a Letter column in my Sheet1 with using the formula Letter = LEFT([Cust. Name],1)

cust name.png

 

So my end result is working:

coollee.png

 

What do I need to do to "override" this and give the Contractor access to her 3 Customers? I was thinking of creating another Table and calling it "Contractor" with a Contractor Column and a Cust. Name column. But how would I relate everything? 

 

 

 

 

 

 

1 REPLY 1
kcantor
Community Champion
Community Champion

@JCBI1023

I would probably use an if statement to give the customer initial a special character and then assign that character to the contractor.

for example, if [CustomerName] is "Pete Smith" then "*" else if [CustomerName] is "Greg Jones" then "&" else [First Letter]

Of course you will need to work on that if statement. I have limited screen acces right now and your images do not work on my mobile so I can't see if you are doing this in query editor or DAX.  





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.