In the new DAX Query View preview feature, there is a cool workflow to Evaluate a measure, and if needed, add the measure DEFINE statement in the query through a Code Action (the light bulb in the picture below):
https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view#measure-update-workflow
If I follow this workflow, the Code Action is there and works.
But if I start from a DAX Query from the Performance Analyzer pane, there's no light bulb. If I press Ctrl+. to check for Code Actions, I get "No code actions available".
Is there any other way to trigger the Code Action? Any idea why this doesn't work? I'm hoping this is a bug to be fixed, because this is just too useful. I've tried editing the DAX from Performance Analyzer to simplify it, but I haven't found anything that enables the Code Action.
It looks like it will not have these options if you already have a DEFINE statement in the query.
The easy workaround is to comment out or just delete the DEFINE at the top of the query