Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Syndicate_Admin

I have a sales listing.

Sales are grouped according to document number.

Each document number can have multiple sales lines.

VL Sales: All sales lines are of the VL type.

VR Sales: All sales lines are of the VR type.

Mixed Sales: There are sales lines that are VL and VR.

https://1drv.ms/u/s!AmRMGhswPKfD929RMuToyEAHE6x-?e=5retIu

The column "My Check" I have created manually and it is my goal, that code is completed that data for each and every one of the sales lines.

"Check Soluton 1" is the column created with the first solution by you. Provided.

"Check solution 2" is the measure created with the second solution by you. Provided.

My goal is to get a chart like the one below, in which I can get a summary of sales according to the "type line Sale" made. And that the unclassified 3284.28 come out correctly classified and add up to 3550.99 between VL, VR and VMixta.

Buscavidas_0-1626727260409.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,

Please update the applied code in Advanced Editor as below: update the data type of column Cant as Whole number. Later check whether you can get the correct result.

let
Origen = Excel.Workbook(File.Contents("C:\Users\jorge\OneDrive\Público\VentasMixtasPBI.xlsx"), null, true),
#"Table (2)_Sheet" = Origen{[Item="Table (2)",Kind="Sheet"]}[Data],
#"Encabezados promovidos" = Table.PromoteHeaders(#"Table (2)_Sheet", [PromoteAllScalars=true]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"Date", type date}, {"Cod", type number}, {"Descripcion", type text}, {"Cant", Int64.Type}, {"Type Line Sale", type text}, {"ImpBruto", type number}, {"NumOp", type text}, {"CHECK", type text}}),
#"Columnas con nombre cambiado" = Table.RenameColumns(#"Tipo cambiado",{{"CHECK", "My CHECK"}})
in
#"Columnas con nombre cambiado"

I just created a sample pbix file based on your provided excel file, it can get the correct result after updated the data type of column Cant as Whole number.

yingyinr_0-1626923121768.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Syndicate_Admin ,

Please update the applied code in Advanced Editor as below: update the data type of column Cant as Whole number. Later check whether you can get the correct result.

let
Origen = Excel.Workbook(File.Contents("C:\Users\jorge\OneDrive\Público\VentasMixtasPBI.xlsx"), null, true),
#"Table (2)_Sheet" = Origen{[Item="Table (2)",Kind="Sheet"]}[Data],
#"Encabezados promovidos" = Table.PromoteHeaders(#"Table (2)_Sheet", [PromoteAllScalars=true]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"Date", type date}, {"Cod", type number}, {"Descripcion", type text}, {"Cant", Int64.Type}, {"Type Line Sale", type text}, {"ImpBruto", type number}, {"NumOp", type text}, {"CHECK", type text}}),
#"Columnas con nombre cambiado" = Table.RenameColumns(#"Tipo cambiado",{{"CHECK", "My CHECK"}})
in
#"Columnas con nombre cambiado"

I just created a sample pbix file based on your provided excel file, it can get the correct result after updated the data type of column Cant as Whole number.

yingyinr_0-1626923121768.png

Best Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.