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.
Me gustaría obtener ayuda para extraer los detalles de una tarjeta de identidad, por ejemplo, 671109106173.
1) El último dígito se refiere al género. Extraño se refiere a macho e incluso se refiere a la hembra.
2) La edad es 2020-1967 (primeros 2 dígitos) 53.
3) El dígito de 7 a 8 se refiere al estado de nacimiento. Entonces, 10 se refiere a Selangor
01 | Johor |
02 | Kedah |
03 | Kelantan |
04 | Malaca |
05 | Negeri Sembilan |
06 | Pahang |
07 | Penang |
08 | Plata |
09 | Perlis |
10 | Selangor |
11 | Terengganu |
12 | Mañana |
13 | Sarawak |
14 | Territorio Federal de Kuala Lumpur |
15 | Territorio Federal de Labuan |
16 | Territorio Federal de Putrajaya |
17 | N/A |
18 | N/A |
19 | N/A |
20 | N/A |
21 | Johor |
22 | Johor |
23 | Johor |
24 | Johor |
25 | Kedah |
26 | Kedah |
27 | Kedah |
28 | Kelantan |
29 | Kelantan |
30 | Malaca |
31 | Negeri Sembilan |
32 | Pahang |
33 | Pahang |
34 | Penang |
35 | Penang |
36 | Plata |
37 | Plata |
38 | Plata |
39 | Plata |
40 | Perlis |
41 | Selangor |
42 | Selangor |
43 | Selangor |
44 | Selangor |
45 | Terengganu |
46 | Terengganu |
47 | Mañana |
48 | Mañana |
49 | Mañana |
50 | Sarawak |
51 | Sarawak |
52 | Sarawak |
53 | Sarawak |
54 | Territorio Federal de Kuala Lumpur |
55 | Territorio Federal de Kuala Lumpur |
56 | Territorio Federal de Kuala Lumpur |
57 | Territorio Federal de Kuala Lumpur |
58 | Territorio Federal de Labuan |
59 | Negeri Sembilan |
Solved! Go to Solution.
Gender = IF(ISODD(RIGHT([Column],1)*1),"Male","Female")
Age =
VAR __Year = LEFT([Column],2) * 1
RETURN
IF __Year < 20, 2000+__Year,1900+__Year)
State =
VAR __Code = MID([Column],7,2)
RETURN
MAXX(FILTER('States',[Code]=__Code),[State])
Hola @flintstone ,
Desmonte @Greg_Deckler fórmula de la y puede obtener la tabla de información.
Cree columnas calculadas como esta.
Gender =
VAR x = RIGHT([identity card], 1 )
RETURN
IF(
MOD(x, 2) = 0,
"Male", "Female"
)
Age =
VAR x = LEFT( [identity card], 2)
RETURN
//According to your information, it seems that everyone was born before 2000?
YEAR( TODAY() ) - (x + 1900)
Birth =
VAR x = MID( [identity card], 7, 2 ) * 1
RETURN
LOOKUPVALUE(
Sheet3[Column2],
Sheet3[Column1], x
)
Saludos
Lionel Chen
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Gender = IF(ISODD(RIGHT([Column],1)*1),"Male","Female")
Age =
VAR __Year = LEFT([Column],2) * 1
RETURN
IF __Year < 20, 2000+__Year,1900+__Year)
State =
VAR __Code = MID([Column],7,2)
RETURN
MAXX(FILTER('States',[Code]=__Code),[State])
@flintstone , En dax se puede utilizar izquierda, derecha y media
https://docs.microsoft.com/en-us/dax/left-function-dax
https://docs.microsoft.com/en-us/dax/right-function-dax
https://docs.microsoft.com/en-us/dax/mid-function-dax
Obtener los valores y se puede hacer coincidir
left([col],2) es su año de nacimiento
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 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |