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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Power BI Dataflows: Can't save dataflow

Can't save dataflows, not when updating existing nor when creating a new.

Get the error message:

"The operation could not be completed because there was a problem updating the Dataflow. The Dataflow is being updated by another operation."

Quite stuck. What to do?

I have a Premium Per User license 

 

Status: Needs Info

Hi @tswm00 

Does this happen in all your dataflows or in a particular dataflow ? When did this happen ?

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Needs Info

Hi @tswm00 

Does this happen in all your dataflows or in a particular dataflow ? When did this happen ?

 

Best Regards,
Community Support Team _ Ailsa Tao

tswm00
Frequent Visitor

Hi @v-yetao1-msft and thanks for your response!

Actually i dont know if this happens to all dataflows, one reason is that I have quite a few another is that I dont want to risk end up in the situation with the dataflows I have and that are working.

I have one dataflow that I created not so long ago and where I simply cant update with additional queries.

I have also tried to create a simple dataflow just reading a CSV file without success. (Se example below)

I have tried to create this simple dataflow in another workspace with the same result.

The only obvious thing that I can think of is that I am trying to create portable queries between PQ Online and PQ Excel (as illustrated below)

 

 

let
// -------------------------------------------------------
pqName ="qReadAP",
PQOnline = true,
// -------------------------------------------------------
/*
2018-01-09    tswm00    Mindre förbättringar/förenklingar
2018-01-22    tswm00    Lägger till DataCreated och DataSource
2018-08-24    tswm00    Använder fnFileFromFolderV2
2018-11-16    tswm00    Definierar konstanter
2019-03-06    tswm00    Hanterar olika format på rapporten beroende på om den kommer via mail eller via nytt export script
2022-11-30    tswm00    Lägger till FilterDataSource
2023-01-11    tswm00    Anpassar till PQOnline
*/
// -------------------------------------------------------
// Constants
// -------------------------------------------------------
    DataSource_c = "FILE",
    ComponentType_c = "ACCESSPOINT",

    FilterDataSourceExclude = Logical.From(Table.TransformColumnTypes(Excel.CurrentWorkbook(){[Name="FilterDataSourceExclude"]}[Content],{{"Column1", type logical}})[Column1]{0}),
    FilterDataSourceIncludeOnly = Logical.From(Table.TransformColumnTypes(Excel.CurrentWorkbook(){[Name="FilterDataSourceIncludeOnly"]}[Content],{{"Column1", type logical}})[Column1]{0}),

// -------------------------------------------------------
// External references
// -------------------------------------------------------
    SourceFile = if PQOnline then p_pathAP else fnFileFromFolderV2(fnGetParameter("pathAP"),true),
    FileDate = if PQOnline then DateTime.From(DateTime.LocalNow()) else fnGetFileDateV2(fnGetParameter("pathAP")),

    fnFilterText = fnFilterTextV2,
    FilterTbl = Table.TransformColumnTypes(Excel.CurrentWorkbook(){[Name="tFilterDataSource"]}[Content],{{"SiteIDExclude", type text}, {"SiteIDIncludeOnly", type text}}),
    
// -------------------------------------------------------
// Query body
// -------------------------------------------------------
    Source = Table.FromColumns({Lines.FromBinary(File.Contents(SourceFile))}),


    RemoveReportHeader =
    if Text.StartsWith(Text.Upper(Table.FirstValue(Source)),"REPORT") then
        let
            #"Removed Top Rows" = Table.Skip(Source,4),
            #"Removed Blank Rows" = Table.SelectRows(#"Removed Top Rows", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))
        in
            #"Removed Blank Rows"
    else
        Source,

    SplitColumnDelimiter = Table.SplitColumn(RemoveReportHeader,"Column1",Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv),{"Column1.1", "Column1.2", "Column1.3", "Column1.4", "Column1.5", "Column1.6"}),
    PromotedHeaders = Table.PromoteHeaders(SplitColumnDelimiter, [PromoteAllScalars=true]),
    ReplacedValue = Table.ReplaceValue(PromotedHeaders,"Location","Site-ID",Replacer.ReplaceText,{"Location"}),
    ChangedType = Table.TransformColumnTypes(ReplacedValue,{{"Location", type text}, {"AP Name", type text}, {"Model", type text}, {"Admin Status", type text}, {"AP IP Address", type text}, {"Map Location", type text}}),

    Filter1 = Table.SelectRows(ChangedType, each ([Location] <> "Disassociated AP(s)" and [Location] <> "Maintenance Mode AP(s)" and [Location] <> "None." and [Location] <> "Site-ID")),
    Filter2 = Table.SelectRows(Filter1, each ([Model] <> null)),
    Filter3 = Table.SelectRows(Filter2, each not Text.StartsWith([AP Name], "AP")),
    RenamedColumns = Table.RenameColumns(Filter3,{{"Location", "SiteID"}, {"AP Name", "Name"}, {"Admin Status", "Status"}, {"AP IP Address", "IPadress"}, {"Map Location", "Location"}}),

    FILTERSiteExclude = 
    if PQOnline then
      RenamedColumns
    else
      fnFilterText(RenamedColumns, "SiteID", FilterTbl, "SiteIDExclude", "EXC", true, FilterDataSourceExclude, null),
    FILTERSiteIncludeOnly =
    if PQOnline then
      FILTERSiteExclude
    else
      fnFilterText(FILTERSiteExclude, "SiteID", FilterTbl, "SiteIDIncludeOnly", "INC", true, FilterDataSourceIncludeOnly, null),

    Type = Table.AddColumn(FILTERSiteIncludeOnly, "Type", each null, type text),
    SerialNumber = Table.AddColumn(Type, "SerialNumber", each null, type text),
    Adress = Table.AddColumn(SerialNumber, "Adress", each null, type text),
    Vendor = Table.AddColumn(Adress, "Vendor", each null, type text),

    UppercasedText = Table.TransformColumns(Vendor,{{"SiteID", Text.Upper}}),

    ComponentType = Table.AddColumn(UppercasedText, "ComponentType", each ComponentType_c, type text),

    DataCreated = Table.AddColumn(ComponentType, "DataCreated",  each FileDate,type datetime),
    DataSource = Table.AddColumn(DataCreated, "DataSource",  each DataSource_c,type text),
    SelectColumns = Table.SelectColumns(DataSource,{"SiteID", "Location", "Adress", "Name", "Model", "Type", "SerialNumber", "IPadress", "Status", "Vendor", "ComponentType", "DataCreated", "DataSource"})
in
    SelectColumns

 

tswm00
Frequent Visitor

Hi again @v-yetao1-msft 

Cant seem to find my previous comment, but I had a vague idea that this could be related to the fact that I am trying to create portable code between PQ Excel and PQ Online.

I tested with one query that failed and removed everything related to PQ Excel and it seems to work which really is a pity since I very much would like to have portability but my current approach does not seem to work (se below). I have commented away all portability adaptions

let
// -------------------------------------------------------
pqName ="qReadAP",
//PQOnline = true,
// -------------------------------------------------------
/*
2018-01-09    tswm00    Mindre förbättringar/förenklingar
2018-01-22    tswm00    Lägger till DataCreated och DataSource
2018-08-24    tswm00    Använder fnFileFromFolderV2
2018-11-16    tswm00    Definierar konstanter
2019-03-06    tswm00    Hanterar olika format på rapporten beroende på om den kommer via mail eller via nytt export script
2022-11-30    tswm00    Lägger till FilterDataSource
2023-01-11    tswm00    Anpassar till PQOnline
*/
// -------------------------------------------------------
// Constants
// -------------------------------------------------------
    DataSource_c = "FILE",
    ComponentType_c = "ACCESSPOINT",

    FilterDataSourceExclude = Logical.From(Table.TransformColumnTypes(Excel.CurrentWorkbook(){[Name="FilterDataSourceExclude"]}[Content],{{"Column1", type logical}})[Column1]{0}),
    FilterDataSourceIncludeOnly = Logical.From(Table.TransformColumnTypes(Excel.CurrentWorkbook(){[Name="FilterDataSourceIncludeOnly"]}[Content],{{"Column1", type logical}})[Column1]{0}),

// -------------------------------------------------------
// External references
// -------------------------------------------------------
//    SourceFile = if PQOnline then p_pathAP else fnFileFromFolderV2(fnGetParameter("pathAP"),true),
    SourceFile = p_pathAP,
//    FileDate = if PQOnline then DateTime.From(DateTime.LocalNow()) else fnGetFileDateV2(fnGetParameter("pathAP")),
    FileDate = DateTime.From(DateTime.LocalNow()),

    fnFilterText = fnFilterTextV2,
    FilterTbl = Table.TransformColumnTypes(Excel.CurrentWorkbook(){[Name="tFilterDataSource"]}[Content],{{"SiteIDExclude", type text}, {"SiteIDIncludeOnly", type text}}),
    
// -------------------------------------------------------
// Query body
// -------------------------------------------------------
    Source = Table.FromColumns({Lines.FromBinary(File.Contents(SourceFile))}),


    RemoveReportHeader =
    if Text.StartsWith(Text.Upper(Table.FirstValue(Source)),"REPORT") then
        let
            #"Removed Top Rows" = Table.Skip(Source,4),
            #"Removed Blank Rows" = Table.SelectRows(#"Removed Top Rows", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))
        in
            #"Removed Blank Rows"
    else
        Source,

    SplitColumnDelimiter = Table.SplitColumn(RemoveReportHeader,"Column1",Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv),{"Column1.1", "Column1.2", "Column1.3", "Column1.4", "Column1.5", "Column1.6"}),
    PromotedHeaders = Table.PromoteHeaders(SplitColumnDelimiter, [PromoteAllScalars=true]),
    ReplacedValue = Table.ReplaceValue(PromotedHeaders,"Location","Site-ID",Replacer.ReplaceText,{"Location"}),
    ChangedType = Table.TransformColumnTypes(ReplacedValue,{{"Location", type text}, {"AP Name", type text}, {"Model", type text}, {"Admin Status", type text}, {"AP IP Address", type text}, {"Map Location", type text}}),

    Filter1 = Table.SelectRows(ChangedType, each ([Location] <> "Disassociated AP(s)" and [Location] <> "Maintenance Mode AP(s)" and [Location] <> "None." and [Location] <> "Site-ID")),
    Filter2 = Table.SelectRows(Filter1, each ([Model] <> null)),
    Filter3 = Table.SelectRows(Filter2, each not Text.StartsWith([AP Name], "AP")),
    RenamedColumns = Table.RenameColumns(Filter3,{{"Location", "SiteID"}, {"AP Name", "Name"}, {"Admin Status", "Status"}, {"AP IP Address", "IPadress"}, {"Map Location", "Location"}}),

    FILTERSiteExclude = RenamedColumns,
/*
    if PQOnline then
      RenamedColumns
    else
      fnFilterText(RenamedColumns, "SiteID", FilterTbl, "SiteIDExclude", "EXC", true, FilterDataSourceExclude, null),
*/
    FILTERSiteIncludeOnly = FILTERSiteExclude,
/*
    if PQOnline then
      FILTERSiteExclude
    else
      fnFilterText(FILTERSiteExclude, "SiteID", FilterTbl, "SiteIDIncludeOnly", "INC", true, FilterDataSourceIncludeOnly, null),
*/
    Type = Table.AddColumn(FILTERSiteIncludeOnly, "Type", each null, type text),
    SerialNumber = Table.AddColumn(Type, "SerialNumber", each null, type text),
    Adress = Table.AddColumn(SerialNumber, "Adress", each null, type text),
    Vendor = Table.AddColumn(Adress, "Vendor", each null, type text),

    UppercasedText = Table.TransformColumns(Vendor,{{"SiteID", Text.Upper}}),

    ComponentType = Table.AddColumn(UppercasedText, "ComponentType", each ComponentType_c, type text),

    DataCreated = Table.AddColumn(ComponentType, "DataCreated",  each FileDate,type datetime),
    DataSource = Table.AddColumn(DataCreated, "DataSource",  each DataSource_c,type text),
    SelectColumns = Table.SelectColumns(DataSource,{"SiteID", "Location", "Adress", "Name", "Model", "Type", "SerialNumber", "IPadress", "Status", "Vendor", "ComponentType", "DataCreated", "DataSource"})
in
    SelectColumns

 

hauffa
Frequent Visitor

@tswm00 , @v-yetao1-msft  - was this ever resolved?  I'm having this same exact issue right now (can't save an existing DF, can't save a super-simple new DF).

tswm00
Frequent Visitor

I dont fully recall this since it was a while ago but there exists a number annoying limitations when it comes to Dataflows/Datamarts e.g. related to dynamic datasources. In practice it means the level of smart/effcient code I have written i PQ för Excel is not portable to dataflow unfortunatley.

rdnguyen
Helper V

Adding to this issue that I am experiencing.

 

I downgraded the Workspace to Pro, then Dataflow is saved normally. However, this action unknowingly destroyed my day after as setting Workspace back to PPU or Trial (Fabric) wouldn't let the workspace to be upgraded again. You may see the workspace got upgraded to PPU or Trial, but in fact, it was not recognized the same way. Dataflows within that workspace would be failed to refreshed.

 

This issue seem to happen to Old Workspace specifically. I created new Workspace and don't experience the same situation.

BatuhanOzgun
Regular Visitor

i had the same alert. 

i saved all dataflows json files and re-built all of them in a new workspace, problem solved. 

But now i had the same alert at new workspace, i cant solve the problem without alternative way. 

 

F_Bastiat
Frequent Visitor

This might happen if another user or even the same user but in another browser/tab/session has either the dataflow opened, or the dataflow settings pane opened. In our case we had another user with a settings credentials editing popup opened, while the second user was unsuccessfully trying to save the dataflow. 

tswm00
Frequent Visitor

Thanks for all inputs regarding this!

I havent seen this for a while and perhaps this is because I am more meticulous e.g. not editing dataflows in multiple browser windows.

However, it is a bit odd that you cant save your work unless it is checked ok. Fortunatley I do all my work on a server so if I need to shut my PC down I can keep editor window open on the server, but that is likely not the case for everyone