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
Tocosta
Frequent Visitor

Issue with a sum if

I have a Column in power bi with a lot of serial numbers. I need a formula that count the serial number if starts with a specific number. This means count all the serial numbers that starts with 7. Counts all the serial numbers that start with 5. 
how can I do this?

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Tocosta 

Try something like this.

 

7 Serial Count = CALCULATE(COUNTROWS(YourTable),LEFT(YourTable[Serial Number],1)="7")

 

View solution in original post

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @Tocosta ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept a helpful reply as the solution to make the thread closed. More people will benefit from it.😀

 

Best Regards,
Eyelyn Qin

AlexisOlson
Super User
Super User

If your serial numbers are stored as text, then you could write something like

Count5 = COUNTROWS ( FILTER ( Table1, LEFT ( Table1[SerialNo] ) = "5" ) )
jdbuchanan71
Super User
Super User

@Tocosta 

Try something like this.

 

7 Serial Count = CALCULATE(COUNTROWS(YourTable),LEFT(YourTable[Serial Number],1)="7")

 

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