Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello, something very strange is happening to me, I have a filtered table in Power Query with a single record, I perform some simple transformations on this table and I am left with two columns (just for the purpose of being able to see the complete image) as shown in image 1, I merge this table with another table that also has a single record and 2 columns (only for the purpose of being able to see the complete image), expanding the table modifies the value of the "To_date" column, In reality several values are changed in several columns, could it be a product problem?
This is my PBI Version: 2.129.1229.0 64-bit (mayo de 2024)
Thank's
Hi @Anonymous
Thank you for your help.
The data is in a sql express on my computer. This problem had not happened to me before, however, the same thing happened to a colleague. To solve the problem I had to perform the left join before the group by, in that case there were no problems when expanding the table. I refreshed all the data from power query and the problem persists, I also refreshed from PBI desktop and the problem persists. I attach the script used in case it is useful.
let
Source = Stock,
RemovedOtherColumns = Table.SelectColumns(Source,{"Material", "To_Date", "Closing_Stock", "ValA", "Closing_Value"}),
FilteredRows1 = Table.SelectRows(RemovedOtherColumns, each [Material] = 205404),
FilteredRows = Table.SelectRows(FilteredRows1, each ([Closing_Stock] <> 0)),
#"Changed Type" = Table.TransformColumnTypes(FilteredRows,{{"To_Date", type date}}),
RenamedColumns = Table.RenameColumns(#"Changed Type",{{"ValA", "Planta"}}),
SortedRows = Table.Sort(RenamedColumns,{{"Material", Order.Ascending}, {"Planta", Order.Ascending}, {"To_Date", Order.Descending}}),
GroupedRows = Table.Group(SortedRows, {"Material", "Planta"}, {{"Data", each _, type table [Material=nullable number, Closing_Stock=nullable number, ValA=nullable text, Closing_Value=nullable number, To_Date=nullable date]}}),
AddedTabletoRecord = Table.AddColumn(GroupedRows, "Custom", each Table.First([Data])),
RemovedOtherColumns1 = Table.SelectColumns(AddedTabletoRecord,{"Custom"}),
ExpandedCustom = Table.ExpandRecordColumn(RemovedOtherColumns1, "Custom", {"Material", "Closing_Stock", "Planta", "Closing_Value", "To_Date"}, {"Material", "Closing_Stock", "Planta", "Closing_Value", "To_Date"}),
ChangedType = Table.TransformColumnTypes(ExpandedCustom,{{"Material", Int64.Type}, {"Closing_Stock", type number}, {"Planta", type text}, {"Closing_Value", Int64.Type}, {"To_Date", type date}}),
MergedProducto = Table.NestedJoin(ChangedType, {"Material"}, Producto, {"Codigo_Material"}, "Producto", JoinKind.LeftOuter),
ExpandedProducto = Table.ExpandTableColumn(MergedProducto, "Producto", {"Net_weight", "Costo_Traslado_Planta"}, {"Net_weight", "Costo_Traslado_Planta"}),
InsertedCostoUnitario = Table.AddColumn(ExpandedProducto, "CostoUnitario", each [Closing_Value] / [Closing_Stock], type number),
InsertedCosto = Table.AddColumn(InsertedCostoUnitario, "Costo", each [CostoUnitario] + [Costo_Traslado_Planta], type number)
in
InsertedCosto
Hi @Ceyzaguirre
I tested with the same version of PBI Desktop and didn't experience the same issue. May I know what data source are you using? Does this problem happen with other data sources? Have you tried Refreshing all preview in Power Query Editor?
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |