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
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
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.