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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Jsonify
Frequent Visitor

Necesita ayuda para implementar la cláusula WHERE en Power Query

En mi instrucción SELECT, tengo problemas para implementar la cláusula WHERE, ya que está utilizando el comando LOWER. También estoy luchando para obtener las partes ('(Invalid)', ('Not Specified')') de la declaración.

SELECCIONAR DISTINTO
T_TESTCASE. ORIGIN_ID como "ID de caso de prueba",
T_TESTCASE.NAME AS "Nombre del caso de prueba",
T_TESTCASE. TESTCASEFOLDER_NAME1 AS "Nombre de la carpeta Top del caso de prueba",
T_TESTCASE. FULLPATH AS "Test Case Fullpath",
T_TESTEXECSTATUS.NAME COMO "Estado de ejecución de prueba",
T_USER. FULLNAME COMO "Diseñador de casos de prueba",
T_HASREQUIREMENT.NAME AS "Tiene Requisito",
T_PROJECT. DOMAIN_NAME como "Nombre de dominio",
T_PROJECT.NAME AS "Nombre del proyecto"
DESDE T_TESTCASE
INNER JOIN T_TESTEXECSTATUS ON T_TESTCASE. T_TESTEXECSTATUS_ID = T_TESTEXECSTATUS. T_TESTEXECSTATUS_ID
INNER JOIN T_USER ON T_TESTCASE. T_DESIGNER_ID = T_USER. T_USER_ID
INNER JOIN T_HASREQUIREMENT ON T_tESTCASE.T_HASREQUIREMENT_ID = T_HASREQUIREMENT. T_HASREQUIREMENT_ID
INNER JOIN T_PROJECT ON T_TESTCASE. T_PROJECT_ID = T_PROJECT. T_PROJECT_ID
Dónde
NOT (T_TESTCASE. TESTCASEFOLDER_NAME1 IN ('(No válido)', '(No especificado)')
O LOWER(T_TESTCASE. TESTCASEFOLDER_NAME1) COMO '%archive%'
O LOWER(T_TESTCASE. TESTCASEFOLDER_NAME1) COMO '%recycle%bin%'
O LOWER(T_TESTCASE. TESTCASEFOLDER_NAME1) COMO '%temp%'
O LOWER(T_TESTCASE. TESTCASEFOLDER_NAME1) COMO '%delete%')
Y T_TESTCASE. DELETED_DATETIME ES NULL
Y T_PROJECT. DELETED_DATETIME ES NULL
Y T_PROJECT. DOMAIN_NAME NOT IN ('(No válido)', '(No especificado)')

Cualquier consejo sería increíble. Gracias.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jsonify , Las tablas deben unirse

necesita tener dos cláusulas de filtro

filtro (T_TESTCASE,
NOT (T_TESTCASE[TESTCASEFOLDER_NAME1] IN ('(No válido)', '(No especificado)')
|| SEARCH("archivo", T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0
|| SEARCH("recycle%bin",T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0
|| SEARCH("temp"T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0

https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

https://www.sqlshack.com/implementing-star-schemas-in-power-bi-desktop/
|| SEARCH("delete"T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0
&& isblank(T_TESTCASE[DELETED_DATETIME]))


, filtro (T_PROJECT, isblank(T_PROJECT[DELETED_DATETIME]) y NOT(T_PROJECT. DOMAIN_NAME IN {"(Invalid)", "(Not Specified)"}))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Jsonify , Las tablas deben unirse

necesita tener dos cláusulas de filtro

filtro (T_TESTCASE,
NOT (T_TESTCASE[TESTCASEFOLDER_NAME1] IN ('(No válido)', '(No especificado)')
|| SEARCH("archivo", T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0
|| SEARCH("recycle%bin",T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0
|| SEARCH("temp"T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0

https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

https://www.sqlshack.com/implementing-star-schemas-in-power-bi-desktop/
|| SEARCH("delete"T_TESTCASE. TESTCASEFOLDER_NAME1,1,0) >0
&& isblank(T_TESTCASE[DELETED_DATETIME]))


, filtro (T_PROJECT, isblank(T_PROJECT[DELETED_DATETIME]) y NOT(T_PROJECT. DOMAIN_NAME IN {"(Invalid)", "(Not Specified)"}))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
lbendlin
Super User
Super User

"Baja" es el menor de sus problemas. Power Query no tiene el concepto de comodines.

Menor: https://docs.microsoft.com/en-us/powerquery-m/text-lower

búsqueda: https://docs.microsoft.com/en-us/powerquery-m/text-contains

INSTRUCCIÓN NOT IN: use listas: "(No válido)", "(No especificado)"

Dato curioso: no puedes usar las listas para la búsqueda. Necesidad de usar o y y .

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors