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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jburbano
Frequent Visitor

Help with column not found....but column is really not found...anywhere_

From PBI Desktop is works fine:

 

 

let
    Source = Odbc.Query("dsn=ServiceNow", "SELECT * FROM sc_item_option_mtom WHERE sc_item_option_mtom.dv_request_item IN (SELECT dv_parent FROM change_request WHERE (active = 1) AND (sys_created_on >= TIMESTAMPADD(SQL_TSI_MONTH, " & Text.From(AddMonths) & ", NOW())))"),
    #"Added Custom" = Table.AddColumn(Source, "KeyValue", each Table.First(Odbc.Query("dsn=OURITSMSYstems", "SELECT value,dv_item_option_new FROM sc_item_option WHERE (sys_id = '" & [dv_sc_item_option] &"')"))),
    #"Expanded KeyValue" = Table.ExpandRecordColumn(#"Added Custom", "KeyValue", {"value", "dv_item_option_new"}, {"value", "dv_item_option_new"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded KeyValue",{{"dv_item_option_new", type text},{"value", type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [dv_item_option_new] <> null and [dv_item_option_new] <> "" and [dv_item_option_new] <> " " and [value] <> null and [value] <> "" and [value] <> " "),
    #"Fuzzy Cluster" = Table.AddFuzzyClusterColumn(#"Filtered Rows", "dv_item_option_new", "dv_item_option_new_fuzzy", [Threshold = 0.95]) as table,
    #"Filtered Rows1" = Table.SelectRows(#"Fuzzy Cluster", each Text.Contains([dv_item_option_new], "File Name(s) - Path - Date")),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows1",{"dv_item_option_new"}),
    #"Grouped Rows" = Table.Group(#"Removed Columns", {"dv_request_item"}, {{"keyValues", each (
        let
            ritmGrouping = Table.RemoveColumns(_,{"request_item", "dv_request_item", "sc_item_option", "dv_sc_item_option", "sys_created_by", "sys_created_on", "sys_id", "sys_mod_count", "sys_tags", "sys_updated_by", "sys_updated_on"}),
            pivotGrouping = Table.Pivot(ritmGrouping, List.Distinct(ritmGrouping[dv_item_option_new_fuzzy]), "dv_item_option_new_fuzzy", "value")
        in
            pivotGrouping
    )    
    , type table [value=text, dv_item_option_new_fuzzy=text]}}),
    #"Expanded keyValues" = Table.ExpandTableColumn(#"Grouped Rows", "keyValues",Table.ColumnNames(Table.Combine(#"Grouped Rows"[keyValues])))
in
    #"Expanded keyValues"

 

 

It is getting custom options from a ticket system and dynamically creating columns for each ticket where it is null if it does not have the option available.  In Desktop, it works perfect, but in service, I am getting the following:

 

 

The '<oii>File Name(s) - Path - Date Time Stamp / Version Id</oii>' column does not exist in the rowset. Table: sc_item_option_mtom_calculated.

 

 

Looking in my data:

 

jburbano_0-1723330644904.png

 

This is from the table, before I pivot the data to columns.  The mention column 'File Name(s) - Path - Date Time Stamp / Version Id' does indeed not exists there...but it shouldn't so not sure where the heck it is even seeing it?  

 

Not sure if the '/' is causing an escape sequence during hte service refresh. As I mentioned, it refreshes fine on PBI desktop.  It fails in service.

2 REPLIES 2
Anonymous
Not applicable

Have you tried clearing the cache under Options>Data?

 

--Nate

It works in desktop though...It is in service that it does not.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.