The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hola a todos
Estoy teniendo datos como los siguientes,
Etiqueta | Empezar | Final |
Coche | 1 | 3 |
Bicicleta | 1 | 5 |
Mi resultado esperado debería ser,
Etiqueta | Valor |
Coche | 1 |
Coche | 2 |
Coche | 3 |
Bicicleta | 1 |
Bicicleta | 2 |
Bicicleta | 3 |
Bicicleta | 4 |
Bicicleta | 5 |
¿Alguien podría ayudarme a conseguir la mesa esperada?
Gracias
Deepak
Solved! Go to Solution.
hola @deepaknarayank
Puede usar esta fórmula simple para crear una nueva tabla
New table =
SELECTCOLUMNS (
FILTER (
GENERATE (
'Table',
GENERATESERIES ( MIN ( 'Table'[Start] ), MAX ( 'Table'[End] ), 1 )
),
[Value] >= [Start]
&& [Value] <= [End]
),
"Label", [Label],
"Value", [Value]
)
Resultado:
y aquí está el archivo pbix de muestra, por favor pruébelo.
saludos
Lin
hola @deepaknarayank
Puede usar esta fórmula simple para crear una nueva tabla
New table =
SELECTCOLUMNS (
FILTER (
GENERATE (
'Table',
GENERATESERIES ( MIN ( 'Table'[Start] ), MAX ( 'Table'[End] ), 1 )
),
[Value] >= [Start]
&& [Value] <= [End]
),
"Label", [Label],
"Value", [Value]
)
Resultado:
y aquí está el archivo pbix de muestra, por favor pruébelo.
saludos
Lin
Hola Lin,
Muchas gracias por su solución..
Esto funciona bien..
Gracias y saludos,
Deepak
Hola
abra Power Query y siga estos pasos:
// Table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wck4sUtJRMgRiY6VYnWglp8zsVKiAqVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Label = _t, Start = _t, End = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Label", type text}, {"Start", Int64.Type}, {"End", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Series", each {[Start]..[End]}),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Label", "Series"}),
#"Expanded Series" = Table.ExpandListColumn(#"Removed Other Columns", "Series")
in
#"Expanded Series"
Saludos FrankAT