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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Dax comparison operations error with advanced full code

Hi

 

Please help to fix my error.

 

jeongkim_0-1732817184751.png

 

 

// Get list of files in SharePoint folder
Documents = Source{[Name="Documents"]}[Content],
// Get list of files in SharePoint folder
#"LGUplus Site Progress" = Documents{[Name="LGUplus Site Progress"]}[Content],
// Get list of files in SharePoint folder
#"TOSS service PO_master" = #"LGUplus Site Progress"{[Name="TOSS service PO_master"]}[Content],
// Get list of files in SharePoint folder
#"Weekly Data" = #"TOSS service PO_master"{[Name="Weekly Data"]}[Content],
#"Removed Other Columns" = Table.SelectColumns(#"Weekly Data",{"Content", "Name"}),
#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "Custom", each Excel.Workbook([Content])),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Custom.Name", "Custom.Data", "Custom.Item", "Custom.Kind", "Custom.Hidden"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded Custom", each ([Custom.Hidden] = false) and ([Custom.Kind] = "Sheet")),
#"Removed Other Columns1" = Table.SelectColumns(#"Filtered Rows",{"Name", "Custom.Name", "Custom.Data"}),
#"Sorted Rows" = Table.Sort(#"Removed Other Columns1",{{"Name", Order.Descending}}),
#"Added Custom1" = Table.AddColumn(#"Sorted Rows", "Custom", each Text.Middle([Name],23,8)),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"Custom", type date}}),
#"Filtered Rows2" = Table.SelectRows(#"Changed Type1", let latest = List.Max(#"Changed Type1"[Custom]) in each [Custom] = latest),
// Dynamically get column names and expand
ColumnNames = Table.ColumnNames(#"Filtered Rows2"[Custom.Data]{0}),
#"Expanded Custom.Data" = Table.ExpandTableColumn(#"Filtered Rows2", "Custom.Data", ColumnNames),
#"Removed Top Rows" = Table.Skip(#"Expanded Custom.Data",2),
#"Promoted Headers" = Table.PromoteHeaders(#"Removed Top Rows", [PromoteAllScalars=true]),
#"Renamed Columns" = Table.RenameColumns(#"Promoted Headers",
{{Table.ColumnNames(#"Promoted Headers"){0}, "Source Name"},
{Table.ColumnNames(#"Promoted Headers"){1}, "Sheet Name"}}),
#"Filtered Rows1" = Table.SelectRows(#"Renamed Columns", each ([Unit price] <> 0)),
#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows1",{{"Contract signed date", type date}, {"Service#", Int64.Type}, {"Unit price", Int64.Type}, {"Date of list amendment", type date}, {"Total FOC Qty", Int64.Type}, {"Service contract#", Int64.Type}, {"Initial PO amount", Int64.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
#"Filtered Rows3" = Table.SelectRows(#"Added Index", each [#"Service#"] <> null and [#"Service#"] <> "")
in
#"Filtered Rows3"

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered? If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!

Bibiano_Geraldo
Super User
Super User

Hi @Anonymous ,
The error message indicates that there is an issue with comparing text values to integer values, determine which columns are causing the issue.

 

Its not easy to say beacuse we cant see your model.

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.