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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
edhans
Super User
Super User

The Insert Code button no longer visible by default

When I go to post, the Insert/Edit Code Sample button (the one that looks like </> ) is no longer visible unless I hit the ellipses and show the full toolbar. That button is super helpful and seems to me to be more useful than the Spoiler button or many other buttons. This is a recent change. I've noticed it this past week.

 

Can we get it back on the default toobar? Makes it so much easier to read longer M and DAX statements.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
3 REPLIES 3
BrandyG_iTalent
Administrator
Administrator

Hey @edhans  - The platform did recently upgrade to the latest toolbar editor available from the platform vendor. This is an out of the box feature that now requires you to expand the toolbar to see all the options available. We have a support article about it here: https://community.powerbi.com/t5/Using-the-Community/How-to-Use-the-Toolbar/ta-p/830505. I'm happy to share your feedback with the team!

Thanks. There are two issues I see, and both relate to pasted code, something done a lot on this forum.

 

1) With the code button hidden, we are more likely to have people, potentially new people, not even know an Insert Code button exists, those of us trying to assist get something like this:

NY 2007 Old 2 :=
CALCULATE (
[Sales Amount],
FILTER (
ALL ( 'Calendar' ),
CONTAINS (
DATATABLE (
"Year", INTEGER,
"Month", STRING,
{
{ 2006, "December" },
{ 2007, "January" }
}
),
[Year], 'Calendar'[Year],
[Month], 'Calendar'[MonthName]
)
)
)

 

vs something like this:

NY 2007 Old 2 :=
CALCULATE (
    [Sales Amount],
    FILTER (
        ALL ( 'Calendar' ),
        CONTAINS (
            DATATABLE (
                "Year", INTEGER,
                "Month", STRING,
                {
                    { 2006, "December" },
                    { 2007, "January" }
                }
            ),
            [Year], 'Calendar'[Year],
            [Month], 'Calendar'[MonthName]
        )
    )
)

 

The former being impossible to read, the latter being easy to read.

 

2) Additionally, it seems the code box no longer scrolls to the right

 

let
    Source = Folder.Files("C:\Users\my secret location of a bunch of files anyone can download\Classes\Collect Combine and Transform Data using PowerQuery eBook\Chapters\C04\C04E04 - Products"),
    #"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File")))
in
    #"Expanded Table Column1"

So instead of scrolling, we get this weird wrap that makes code, most notably M code that can be really long, hard to read. Vs the horizontal scroll bar that kept the wraps where they belonged vs arbitrarily setting them.

 

I'd much rather the strike through & Insert Spoiler Tag icons be in the advanced bar and the Insert Code be on the main tool bar. I don't even know what the spoiler tag would be used for on this site. Even the video button will be used pretty rarely.

 

Maybe there are some stats from the old site where someone could see how often things like Code were used vs Strike Through or Spoiler? I'd be surprised if the latter two were used much. Not never to be sure, but Code should be used in virtually every thread at some point, either by the OP or the one trying to answer, at least on questions that involve DAX or Power Query M code.

 

Thanks for the response @BrandyG_iTalent

 

 

 

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

FYI - I don't recall seeing a single new person post code in a readable format because no one knows the code button exists. It is impossible to read functions like this.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Top Solution Authors