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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
RickyTWK
New Member

Count the data from filter rules

Hello, I work from construction company.

I would like to count two type of data which are naming start with "RFI-A" and "RFI-BS"

Can I do this in single column? 

Thank you so much!

RickyTWK_0-1689071731226.png

 

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@RickyTWK ,

Try this two measures,

RFI-A = CALCULATE(
    COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-A"))
RFI-BS = CALCULATE(
    COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-BS"))

Arul_0-1689072482019.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


View solution in original post

4 REPLIES 4
Arul
Super User
Super User

@RickyTWK ,

Try this two measures,

RFI-A = CALCULATE(
    COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-A"))
RFI-BS = CALCULATE(
    COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-BS"))

Arul_0-1689072482019.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


The formula not work....

Am I missing somethings?

Measure 2 = CALCULATE(COUNT('Issues'[RFI No.],CONTAINSSTRING('Issues'[RFI No.],"RFI-A")))
 
I provide more information, the column of "RFI. No" have a lot of empty data.
Only 11 row has value which are RFI-A and RFI-BS
Thanks!

RickyTWK_0-1689073625581.png

 

 

@RickyTWK ,

You are missing close bracket for count and remove one close bracket at the end.
Put a ) at yellow marked place before the comma and remove bracket at red marked place at the end of the formula..

Arul_0-1689074153739.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


pratyashasamal
Memorable Member
Memorable Member

Hi @RickyTWK ,
You can use COUNTX function and create a measure .
https://learn.microsoft.com/en-us/dax/countx-function-dax
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





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

Proud to be a Super User!





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.