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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.