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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
smith7
Regular Visitor

contar. si conjunto y comodin

Hola, quisiera saber la forma en que pueda contar la cantidad de datos que contiene una columna de acuerdo a criterios y que uno de esos criterios sea que contenga una palabra determinada "DS" Dejo un ejemplo como se realiza en excel para ilustrar la idea

= CONTADORES ( C13:C21 ; "8" ; B13:B21 ; "*SDR*" )

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @smith7 ,

I created some data:

vyangliumsft_0-1650856438810.png

Here are the steps you can follow:

1. Create calculated column.

Total =
var _table=
FILTER('Table',
ISERROR(
        SEARCH("SDR", 'Table'[Flag2])) =TRUE()
        &&
ISERROR(
        SEARCH(8, 'Table'[Flag2])) =TRUE())
return
IF(
'Table'[Flag1] in SELECTCOLUMNS(_table,"1",[Flag1])&&'Table'[Flag2] in SELECTCOLUMNS(_table,"2",[Flag2]),
SUMX(_table,[amount]),BLANK())

2. Result:

vyangliumsft_1-1650856438813.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @smith7 ,

I created some data:

vyangliumsft_0-1650856438810.png

Here are the steps you can follow:

1. Create calculated column.

Total =
var _table=
FILTER('Table',
ISERROR(
        SEARCH("SDR", 'Table'[Flag2])) =TRUE()
        &&
ISERROR(
        SEARCH(8, 'Table'[Flag2])) =TRUE())
return
IF(
'Table'[Flag1] in SELECTCOLUMNS(_table,"1",[Flag1])&&'Table'[Flag2] in SELECTCOLUMNS(_table,"2",[Flag2]),
SUMX(_table,[amount]),BLANK())

2. Result:

vyangliumsft_1-1650856438813.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors