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.
Tengo esto en mi mesa:
Fecha | LIM FDO | GLUE FRP | Y |
26 de febrero | 208 | 686 | A |
26 de febrero | 939 | 2166 | B |
Y necesito mostrar esto como una tabla en mi tablero:
Fecha | VALOR | Y | Des |
26 de febrero | 208 | A | LIM FDO |
26 de febrero | 939 | B | LIM FDO |
26 de febrero | 686 | A | GLUE FRP |
26 de febrero | 2166 | B | GLUE FRP |
No tengo idea de cómo hacer esto en DAX, y necesito hacer esto en DAX
Hola @caslus ,
Forma DAX :
Table 2 =
VAR a =
SELECTCOLUMNS ( 'Table', "und", 'Table'[UND], "date_", 'Table'[DATE] )
VAR k =
CROSSJOIN ( { "LIM FDO", "LIM FRP" }, a )
RETURN
ADDCOLUMNS (
k,
"result", IF (
[Value] = "LIM FDO",
CALCULATE ( SUM ( 'Table'[LIM FRP] ) ),
IF ( [Value] = "LIM FRP", CALCULATE ( SUM ( 'Table'[LIM FDO] ) ) )
)
)
Pbix como adjunto.
Creo que quieres desenriste tus dos columnas intermedias, así:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnEMcVXSUfLx9FVwc/GHsYICgKxQPxelWJ1oJSMz/bTUMqCAkYEFkDSzMAOSjqhSlsaWIAWGZiA5J6XYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"(blank)" = _t, #"(blank).1" = _t, #"(blank).2" = _t, #"(blank).3" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"(blank)", type text}, {"(blank).1", type text}, {"(blank).2", type text}, {"(blank).3", type text}}),
#"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
#"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"DATE", type text}, {"LIM FDO", Int64.Type}, {"LIM FRP", Int64.Type}, {"UND", type text}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {"DATE", "UND"}, "Attribute", "Value")
in
#"Unpivoted Columns"
¿Esto está en la consulta de energía?
Necesito hacer esto en DAX, porque tengo otras columnas en mi tabla.
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 |