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.
Por favor, ayuda en la lucha por una medida de dax . TPID tiene varios gerentes (MWA) y necesito repetir el primer administrador para el mismo tpid. como se muestra a continuación
Valores deseados de TPID MWA
1 | Jame | Jame |
1 | Billy | Jame |
1 | Camy | Jame |
1 | Billy | Jame |
2 | Billy | |
2 | Billy | Billy |
2 | Camy | Billy |
2 | Billy | |
3 | Ammar | Ammar |
3 | Ammar | Ammar |
3 | Ammar | |
3 | Camy | Ammar |
Solved! Go to Solution.
Hola @ahmedaldafaae ,
Según mi comprensión, desea utilizar el primer valor no en blanco en cada grupo de id como el valor del mismo grupo, ¿verdad?
Puede usar la siguiente fórmula después de agregar una columna de índice:
Measure =
VAR _firstnoblank =
CALCULATE (
MIN ( 'Table'[Index] ),
FILTER (
ALL ( 'Table' ),
'Table'[TPID] = MAX ( 'Table'[TPID] )
&& 'Table'[MWA] <> BLANK ()
)
)
RETURN
CALCULATE (
MAX ( 'Table'[MWA] ),
FILTER ( ALL ( 'Table' ), 'Table'[Index] = _firstnoblank )
)
Mi visualización tiene este aspecto:
¿He respondido a tu pregunta? Por favor, marque mi respuesta como solución. Muchas gracias.
Si no es así, cargue algunas muestras de datos insensibles y la salida esperada.
Saludos
Eyelyn Qin
Hola @ahmedaldafaae ,
Según mi comprensión, desea utilizar el primer valor no en blanco en cada grupo de id como el valor del mismo grupo, ¿verdad?
Puede usar la siguiente fórmula después de agregar una columna de índice:
Measure =
VAR _firstnoblank =
CALCULATE (
MIN ( 'Table'[Index] ),
FILTER (
ALL ( 'Table' ),
'Table'[TPID] = MAX ( 'Table'[TPID] )
&& 'Table'[MWA] <> BLANK ()
)
)
RETURN
CALCULATE (
MAX ( 'Table'[MWA] ),
FILTER ( ALL ( 'Table' ), 'Table'[Index] = _firstnoblank )
)
Mi visualización tiene este aspecto:
¿He respondido a tu pregunta? Por favor, marque mi respuesta como solución. Muchas gracias.
Si no es así, cargue algunas muestras de datos insensibles y la salida esperada.
Saludos
Eyelyn Qin
Gracias
Simplemente funciona!!
@ahmedaldafaae
Probé una solución de Power Query agregando solo una columna personalizada:
Pegue el código siguiente en una consulta en blanco en el Editor avanzado y compruebe el paso agregado.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfJKzE1VitWBcJwyc3Iq4TznxNxKLFJGQJ4CnIUqDteCUGQMZDnm5iYW4eAhVEE0xwIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [TPID = _t, MWA = _t]),
#"Added Custom" = Table.AddColumn(Source, "New MWA", (r)=> List.First(Table.SelectRows(Source, each [TPID] = r[TPID] and [MWA] <> " ")[MWA]))
in
#"Added Custom"
________________________
Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla
Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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
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 |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |