Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hola
Necesito ayuda con la validación de valores mediante DAX para determinar si solo contienen valores alfanuméricos .
Si el valor contiene solo valores alfanuméricos , debe devolver TRUE; de lo contrario, debería devolver FALSE.
| Valor |
| gtest@gmail.com |
| 16546854 |
| 464213 |
| 1641654 |
| 564646 |
| 646464 |
| 546498 |
| 46464 |
| 64646464 |
| 646486 |
| 64646546 |
| ASW4646464 |
| AW54646 |
| AQ464654 |
| AD446464 |
| AS4646DD |
| ASDSWSD |
| KLHH |
| OOOOOOOO |
| POJPOJP |
@InsightSeeker
Puede crear una columna calculada en la tabla como se muestra a continuación. ¡Siéntase libre de ajustar la fórmula o hacer más preguntas!
To handle blank values in your column and prevent GENERATESERIES from crashing, you can add a check for blank values in the VAR Length declaration and handle those cases appropriately
AlphanumericCheck =
VAR CurrentValue = 'YourTable'[YourColumn]
VAR Length = LEN(CurrentValue)
VAR CheckChar =
IF(
ISBLANK(CurrentValue),
0, // No characters to check, so treat as alphanumeric
SUMX(
GENERATESERIES(1, Length),
VAR CurrentChar = MID(CurrentValue, [Value], 1)
RETURN
IF(
NOT (
(UNICODE(CurrentChar) >= UNICODE("A") && UNICODE(CurrentChar) <= UNICODE("Z")) ||
(UNICODE(CurrentChar) >= UNICODE("a") && UNICODE(CurrentChar) <= UNICODE("z")) ||
(UNICODE(CurrentChar) >= UNICODE("0") && UNICODE(CurrentChar) <= UNICODE("9"))
),
1,
0
)
)
)
RETURN
IF(CheckChar > 0, FALSE, TRUE)
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.