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.

Reply
Anonymous
Not applicable

Copy Paste Advance Editor Wouldn't Work / Custom Calculation Table Return Error

Does anyone has the same issue to replicate conditioning table on several Power BI files ?

I can replicate renamed collumn, rounded, changed type, but not conditional collumn or additonal collumn.

 

Below is my partial advance editior text : Any errors ?

 

#"Added Custom3" = Table.AddColumn(#"Rounded Off2", "Rev Volume US$", each [#"Volume US$"]*0.9),
#"Changed Type3" = Table.TransformColumnTypes(#"Added Custom3",{{"Rev Volume US$", Currency.Type}}),
#"Added Conditional Column" = Table.AddColumn(#"Changed Type3", "Customer", each if [#"Channel / End User"] = "End User" then [#"Channel / End User"] else [End User]),
#"Added Custom4" = Table.AddColumn(#"Added Conditional Column", "Delivery-Close Date", each [Delivery Date]-[Expected Close Date]),
#"Added Conditional Column1" = Table.AddColumn(#"Added Custom4", "B&S", each if [#"Delivery-Close Date"] < #duration(90, 0, 0, 0) then "Yes" else if [#"Delivery-Close Date"] <= #duration(0, 0, 0, 0) then "Date Error" else if [#"Delivery-Close Date"] = null then "Date Error" else "No"),
#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Op1", each if [#"FC%"] = "100%" then 1 else if [#"FC%"] = "80%" then 1 else if [#"FC%"] = "60%" then 1 else if [#"FC%"] = "40%" then 2 else 0),
#"Added Conditional Column3" = Table.AddColumn(#"Added Conditional Column2", "Op2", each if [#"DP%"] = "100%" then 1 else if [#"DP%"] = "80%" then 1 else if [#"DP%"] = "60%" then 1 else 0),
#"Added Conditional Column4" = Table.AddColumn(#"Added Conditional Column3", "Custom", each if [Op1] = [Op2] then "Commited" else if [Op2] = 0 then "Non Commited" else "Upside")
in
#"Added Conditional Column4"

 

 

 

image.pngBesides, I am trying to calculate number of days from : Delivery Date - Expected Date, because some of my date filed is not filled, hence some result returned null. Then when I performed IF Function with the conditional collumn: If Delivery Date - Expected Date = null, Power BI will return Error, that is when my Power BI will have refresh error. Shown in the print screen on left.

2 ACCEPTED SOLUTIONS

Hi @Anonymous,

 

What's error messages? Did you set the proper connection? Sometimes you need to configure the connection and the privacy level.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @Anonymous,

 

I'm glad you can go on now. Most of the time, there will be a prompt. You can change the settings as the picture shows. The exact solutions depend on the errors. 

Copy_Paste_Advance_Editor_Wouldn_t_Work_Custom_Calculation_Table_Return_Error

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

It seems fine. What are the errors exactly? Can you share them with us? You can click the "View errors" for details. If we know what the errors are, we can troubleshoot the queries.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Jiascu,

The error has been fixed and is not interrupting my refresh schedule.
My concern now is with the advance editor script, which I tried copy and paste on a new Power Bi file but it won’t work. I have to manually redo all the steps again. Please help with this advance editor script.

Hi @Anonymous,

 

What's error messages? Did you set the proper connection? Sometimes you need to configure the connection and the privacy level.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Apparently it works when I restarted my computer and perhaps my connection was reset.

If I don't reset, how do I go about configuring the connection at privacy level ? Mind share a screenshot and steps ?

 

Thank You

Hi @Anonymous,

 

I'm glad you can go on now. Most of the time, there will be a prompt. You can change the settings as the picture shows. The exact solutions depend on the errors. 

Copy_Paste_Advance_Editor_Wouldn_t_Work_Custom_Calculation_Table_Return_Error

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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