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
¿Alguien puede ayudarme con una solución a esto?
Hemos creado un informe Matrix, pero necesitamos filtrar filas en función del valor de al menos dos columnas en una matriz.
Proveedor | Corporativa | Energía | Defensa |
Proveedor 1 | Z04M | Z06M | |
Proveedor 2 | Z06M | ||
Proveedor 3 | Z06M | Z06M | |
Proveedor 4 | Z09M | ||
Proveedor 5 | Z09M | Z03M |
Queremos mantener solo el Proveedor 1, 3 y 5.
(y el sueño podría ser sólo mantener el Proveedor 1 & 5 porque el valor no es el mismo)
Gracias por tu ayuda,
Julian.
Solved! Go to Solution.
@JuliCraps En primer lugar, la tabla debe transformarse para un mejor diseño, básicamente desenrestable la tabla, para desencelar estos pasos:
- transformar datos
- Seleccionar columna de proveedor
- haga clic con el botón derecho del derecho, desdinámica otras columnas agregará dos columnas, atributo y valor, cambiarela según su requisito
- filtrar filas de valores en blanco (no los necesitamos)
- cerrar y aplicar
Para visualizar,
- matriz visual:
- añadir proveedor en filas,
- añadir atributo en las columnas
- añadir valor en la sección de valores
Agregue la siguiente medida:
Count Measure = CALCULATE ( DISTINCTCOUNT ( Vendor[Value] ), ALLEXCEPT ( Vendor, Vendor[Vendor] ) )
y utilizar esta medida como filtro de nivel visual en la matriz anterior visual
y aquí está el resultado
Aquí está el script M para despivotar, crear una consulta en blanco y en el editor avanzado pegar el siguiente código:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCi4tKMjJTC1SMFTSUYoyMPEFU2YgSkEpVgdJgRGyDIasMVQYqgJMoSgwAYta4tBuipCNMjAGUUqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Vendor = _t, Corporate = _t, Energy = _t, Defence = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Vendor", type text}, {"Corporate", type text}, {"Energy", type text}, {"Defence", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Vendor"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] <> "" and [Value] <> " "))
in
#"Filtered Rows"
Me gustaría❤ elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Filtro de energía <> En blanco (nivel visual)
O tener una medida como
Calculate(Sum(Table[Value]),not(isblank(Table[Energy])))
@JuliCraps En primer lugar, la tabla debe transformarse para un mejor diseño, básicamente desenrestable la tabla, para desencelar estos pasos:
- transformar datos
- Seleccionar columna de proveedor
- haga clic con el botón derecho del derecho, desdinámica otras columnas agregará dos columnas, atributo y valor, cambiarela según su requisito
- filtrar filas de valores en blanco (no los necesitamos)
- cerrar y aplicar
Para visualizar,
- matriz visual:
- añadir proveedor en filas,
- añadir atributo en las columnas
- añadir valor en la sección de valores
Agregue la siguiente medida:
Count Measure = CALCULATE ( DISTINCTCOUNT ( Vendor[Value] ), ALLEXCEPT ( Vendor, Vendor[Vendor] ) )
y utilizar esta medida como filtro de nivel visual en la matriz anterior visual
y aquí está el resultado
Aquí está el script M para despivotar, crear una consulta en blanco y en el editor avanzado pegar el siguiente código:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCi4tKMjJTC1SMFTSUYoyMPEFU2YgSkEpVgdJgRGyDIasMVQYqgJMoSgwAYta4tBuipCNMjAGUUqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Vendor = _t, Corporate = _t, Energy = _t, Defence = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Vendor", type text}, {"Corporate", type text}, {"Energy", type text}, {"Defence", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Vendor"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] <> "" and [Value] <> " "))
in
#"Filtered Rows"
Me gustaría❤ elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Muchas gracias @parry2k, es perfecto 🤗.
(Disculpas, mi fuente inicial no fue construida como explico, aprecio su recomendación).
Hola @amitchandak,
el filtro no se basa en la columna "Energía", sino para las filas con un valor en al menos 2 columnas.
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 | |
1 | |
1 |