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
alhowarth
Helper I
Helper I

Ayuda de DAX por favor

Me gustaría crear el equivalente DAX de esto:

SELECT COUNT(JOB_NAME) JOB_COUNT
DESDE MYDB.dbo.MY_TABLE
DONDE JOB_TYPE <> '98'
Y BOX_NAME <> ''

Puedo obtener el recuento usando esto: JOB_COUNT - COUNT(MY_TABLE[JOB_NAME])

Pero no puede filtrar eso para que coincida con mis declaraciones WHERE

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@alhowarth , Probar como

calculate(count(MY_TABLE[JOB_NAME]), filter(MY_TABLE, MY_TABLE[JOB_TYPE] á"98" && not(isblank(MY_TABLE[BOX_NAME])) ))

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@alhowarth , Probar como

calculate(count(MY_TABLE[JOB_NAME]), filter(MY_TABLE, MY_TABLE[JOB_TYPE] á"98" && not(isblank(MY_TABLE[BOX_NAME])) ))

jdbuchanan71
Super User
Super User

@alhowarth

Prueba algo como esto.

Filtered Count =
CALCULATE (
    COUNT ( MY_TABLE[JOB_NAME] ),
    FILTER ( MY_TABLE, MY_TABLE[JOB_TYPE] = "98" && MY_TABLE[BOX_NAME] = "" )
)

@amitchandak, que funcionó, gracias!

@jdbuchanan71

Gracias por la sugerencia, aunque encontré un nuevo error: la expresión contiene varias columnas, pero solo se puede usar una sola columna en una expresión True/False que se utiliza como expresión de filtro de tabla.

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.