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.
Hola
Estoy buscando diferentes funciones para hacer lo siguiente, tal vez usando countrows y buscar o encontrar, pero no estoy obteniendo la sintaxis correcta.
En inglés, encuentre dónde
Totalmente exitoso: CALCULATE([MeasureName], Category[Category] á "Completado y se ha mantenido correctamente" Categoría[Categoría] - "Completado y a la izquierda con éxito")
Lo anterior funciona bien, pero estoy buscando hacer una manera diferente usando nuevas funciones.
Cualquier ayuda apreciada.
Solved! Go to Solution.
Hola @johnmelbourne ,
Puede crear una medida como se indica a continuación:
_Total successful =
var _search1=SEARCH("Successfully completed and stayed",MAX('Category'[Category]),1,0)
var _search2=SEARCH("Successfully completed and left",MAX('Category'[Category]),1,0)
Return
CALCULATE([Measure name],FILTER('Category',_search1<>0||_search2<>0))
O una medida como se indica a continuación:
_Total successful 1 =
var _search=CALCULATE(COUNTROWS(FILTER('Category','Category'[Category]=MAX('Category'[Category]))),'Category'[Category]="Successfully completed and stayed" || Category[Category] = "Successfully completed and left")+0
Return
CALCULATE('Category'[Measure name],FILTER('Category',_search<>0))
Saludos
Kelly
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!
Hola @johnmelbourne ,
Puede crear una medida como se indica a continuación:
_Total successful =
var _search1=SEARCH("Successfully completed and stayed",MAX('Category'[Category]),1,0)
var _search2=SEARCH("Successfully completed and left",MAX('Category'[Category]),1,0)
Return
CALCULATE([Measure name],FILTER('Category',_search1<>0||_search2<>0))
O una medida como se indica a continuación:
_Total successful 1 =
var _search=CALCULATE(COUNTROWS(FILTER('Category','Category'[Category]=MAX('Category'[Category]))),'Category'[Category]="Successfully completed and stayed" || Category[Category] = "Successfully completed and left")+0
Return
CALCULATE('Category'[Measure name],FILTER('Category',_search<>0))
Saludos
Kelly
¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!
Hola, @johnmelbourne, una alternativa fundamental a su medida es como
Total successful =
CALCULATE (
[MeasureName],
Category[Category]
IN { "Successfully completed and stayed", "Successfully completed and left" }
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
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
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hola
Lo siento, sólo mecanograme a la mitad que parece.
En inglés, estoy tratando de escribir una medida donde dice encontrar donde la categoría contiene las palabras "Completado con éxito".
Sólo intento aprender una nueva forma de sumar valores cuando una ceteria contiene una parte de una cadena.
Así que, por ejemplo; ¿qué búsqueda? / encontrar ? / partido ? Función DAX utilizaría para calcular
Suma [Ventas] donde Product[ProductName] contiene la palabra "health"
Cuando los nombres de los productos pueden ser
Gel de salud
Calcetines de salud
Salud general
Salud física
Salud mental
Cualquier ayuda apreciada.
Usted puede tratar de
Measure =
CALCULATE (
COUNTROWS ( 'Product' ),
SEARCH ( "health", 'Product'[ProductName],, FALSE () )
)
MATCH() no está disponible en la función nativa de DAX lib. Al igual que Excel, SEARCH() no distingue mayúsculas de minúsculas, mientras que FIND() es así.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |