I've been trying for about 30 minutes to work out what on earth in my message the system is mistaking for code, and every time I press submit and it tells me vaguely "oh I think there's code in here, try again" I get more and more frustrated.

The current system is, honestly, dreadful. I'm a new user, asking a good faith question, and it's making me never want to use this website again. It could at least highlight where it thinks the issue is - I'm just being told night is day, again and again and again.

Why would Stack Overflow mistake prose for code? Alternatively, my message contains multiple tables, with one column containing values in the format "+3.2%" - does it think this is code?

Update: I've put all the tables in code tags after experimenting furiously, and it's posting now, so it was indeed the tables. I'm still not clear why it behaved this way, given the tables were showing up correctly in the preview, or which of the tables it had an issue with.

Basically - let's say I run a hat company, and every year the Hat Bureau gives us a guideline as to how much we can increase the price of hats.
|Year|Price increase|
|2015|n/a first year|
|2016|+3.2%         |
|2017|+2.2%         |
|2018|+4.0%         |
|2019|+1.0%         |
|2020|+0.0%         |
|2021|+4.0%         |
Where I've got so far with this, is I've worked out how to use product and filter to produce the following output...
|Year|Price increase|Hat price|
|2015|n/a first year|£3.00000 |
|2016|+3.2%         |£3.09600 |
|2017|+2.2%         |£3.16411 |
|2018|+4.0%         |£3.29068 |
|2019|+1.0%         |£3.32358 |
|2020|+0.0%         |£3.32358 |
|2021|+4.0%         |£3.45653 |
...But in the real world, I'm not applying an uplift of 2.2% to a £3.09600 hat and selling it for £3.16411, I'm actually calculating (£3.10 + 2.2%) -> £3.1682 -> £3.17
Which gives me a penny difference, and these penny differences accumulate over time. 
Does anyone have any suggestions for how I might build a "real world" calculation, where I'd round the price off every year and only apply the increase to the rounded price? Easy in Excel, but I can't work out a way to do it in Power BI without producing a new column for each consecutive year, which is impractical given the size of the (real, non-hat-related) data set. 
Ideally I'd want my data set to look like this...
|Year|Hat price last year|Price increase|Hat price this year|
|2015|n/a                |n/a           |£3.00              |
|2016|£3.00              |+3.2%         |£3.10              |
|2017|£3.10              |+2.2%         |£3.17              |
|2018|£3.17              |+4.0%         |£3.30              |
Happy with a DAX solution or a Power Query solution, I'd been trying to do something in DAX but I don't think I can direct a calculated column to itself.
  • one column containing values in the format "+3.2%" - does it think this is code? Yes.
    – rene
    Jul 1, 2021 at 9:59
  • 5
    There are 15 results for that error on Meta SO: meta.stackoverflow.com/… . As we don't have a clue what you're trying to post, please go over these 15 question and see if they have cases that look similar to yours and then adapt accordingly .
    – rene
    Jul 1, 2021 at 10:03
  • An alternative approach is to remove most of the text and then tab out of the editor window to see if the resolves the issue. Then start adding lines back into the edit window, repeating the tab trick until you found the bit that triggers it.
    – rene
    Jul 1, 2021 at 10:06
  • 7
    In general, the regex gets very confused if you have little to no blank lines between markdown blocks. Adding blank lines in front and after a heading, in front and after a codeblock and in front and after an image and in front and after a table might resolve the issue. Also note that code can be indicated as such with code fence: Three single quotes on a line by it self will work.
    – rene
    Jul 1, 2021 at 10:09
  • 1
    34 similar reports on Meta here: meta.stackexchange.com/…
    – rene
    Jul 1, 2021 at 10:11
  • 8
    @rene I'm very aware of the similar reports, I've spent the best part of an hour now poring through them, and trying to apply vague suggestions to my own query to absolutely no avail. Thank you for pointing me in the right direction though! Ultimately, it's baffling that StackExchange doesn't highlight the issue - copying and pasting bit by bit feels absurd!! Jul 1, 2021 at 10:16
  • @rene "Does it think this is code? Yes." This feels like progress - how would a user enter a table containing numbers, if it insists on code formatting? Do I need to put code tags around every table? Jul 1, 2021 at 10:18
  • 1
    couple of qualms with your question (not related to the bug report you’re submitting on meta) is that based on the pastebin, you said thanks at the end, and while that is nice of you, here on Stack Exchange (which includes Stack Overflow) saying thanks is generally discouraged so I would advise you edit it out. Also, on a completely different note, I would advise you to read the meta tour, the stack overflow tour, the meta help center, and the Stack Overflow help center. Jul 1, 2021 at 12:07
  • 12
    Yes this is terrible UX. New users should not have to search meta (if they even know what that is) to try to work out what is apparently wrong with their post.
    – Paul White
    Jul 1, 2021 at 12:26
  • Probably not the reason, but you have 9 trailing spaces in that part. You could exclude that possibility by removing trailing space. Jul 1, 2021 at 14:48
  • 3
    @rene well, if there are 34 similar reports it probably means that something should be improved in the system...
    – wimi
    Jul 1, 2021 at 15:24
  • 2
    @wimi I don't think I've said anywhere this couldn't be improved. I was more in support mode to offer options the OP could try, assuming they also wanted their question posted. But I admit I got some nice rep from the few questions I answered about this sub-optimal UX ... hate to see it go ;)
    – rene
    Jul 1, 2021 at 15:32
  • 1
    The Sandbox might be helpful. You can post your question as an answer and then keep editing it until it has everything you want, formatted the way you want. You can do scorched earth troubleshooting there and cut whole chunks in order to track down the issue (the way it wouldn't be safe to do in a real question post).
    – BSMP
    Jul 1, 2021 at 17:35
  • 2
    It could at least highlight where it thinks the issue is... That would be a good feature request if a similar one doesn't already exist. I don't know difficult it would be to add that feature but it would be useful.
    – BSMP
    Jul 1, 2021 at 17:38
  • @BSMP Sadly, the sandbox accepts the text of my post as a comment but refuses it as a post. Good thought though! Jul 5, 2021 at 7:34


You must log in to answer this question.

Browse other questions tagged .