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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
benjaminhoang
Helper III
Helper III

Adding 3 columns together to get a total to show on a card

Hello,


WE are trying to track how much work is contracted out. All numbers that start with 1 in STEP 1, 2, 3 belong to our company everything us else is contracted out. We would like to count everything that does not start with 1 so it can be shown on a card.

 

STATUSTRIPSTEP 1STEP 2STEP 3TOTAL ?
CompleteP26332126126GO928
CompleteP26321126126TRACT
completeD84470101101DFG
CompleteD84416114107SDF
CompleteD84457116108132
completeD84523121123234
completeD84557109109123
completeD84405120TRACT874
completeD84505GO123102 
completeP26345110110 
completeD84534108108 
completeD84533118118234
CompleteP26344107107534
CompleteP26318101101123
completeP26343429429133
completeP26313124124 
completeP26340114114456
completeP26341108108123
1 ACCEPTED SOLUTION

Then you should add that condition to the formula, it would look something like:

TOTAL = IF(ISBLANK(STEP1)=TRUE,0,IF(LEFT(STEP1,1)="1",0,1))+IF(ISBLANK(STEP2)=TRUE,0,IF(LEFT(STEP2,1)="1",0,1))+IF(ISBLANK(STEP3)=TRUE,0,IF(LEFT(STEP3,1)="1",0,1))

 

Let me know if it works

View solution in original post

3 REPLIES 3
alexvc
Resolver I
Resolver I

I'm not sure if I follow, but I think you can calculate that as a column by means of a formula like: TOTAL = IF(LEFT(STEP1,1)="1",0,1)+IF(LEFT(STEP2,1)="1",0,1)+IF(LEFT(STEP3,1)="1",0,1)

 

This will give you the sum in the total field of subcontracted steps per trip

 

 

Hey @alexvc  this works well but I forgot to ask can we have blanks not be included in the sum but rather be treated as our drivers who start with 1. I tried to change it myself but failed.

Then you should add that condition to the formula, it would look something like:

TOTAL = IF(ISBLANK(STEP1)=TRUE,0,IF(LEFT(STEP1,1)="1",0,1))+IF(ISBLANK(STEP2)=TRUE,0,IF(LEFT(STEP2,1)="1",0,1))+IF(ISBLANK(STEP3)=TRUE,0,IF(LEFT(STEP3,1)="1",0,1))

 

Let me know if it works

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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