You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I inadvertently used SELECTEDMEASURE() when creating a measure (I was in T/E 3) in addition to the calculation item, which of course did nothing. Only took me 30min to find my problem after all sorts of other troubleshooting steps.
In general, our DAX parser design philosophy is that we should provide similar error messages as those from Analysis Services/Power BI. Since using SELECTEDMEASURE (or any of the related calc item functions) in a measure is not an error from an Analysis Services point of view (who knows why), we do not show an error message in TE3 either.
However, we can definitely improve the experience in TE3 by removing SELECTEDMEASURE, ISSELECTEDMEASURE, SELECTEDMEASURENAME, etc. from the auto-complete feature, so if you really want to use these functions, you can still do so without TE3 complaining - it just won't suggest them anymore (unless you're writing a calc item expression).
Anything that will protect us from our dumb coding will help. 😁 Even if you don't throw an error, a tip or some visual indicator that SELECTEDMEASURE() in a measure is meaningless. I agree in general you should adhere to the errors from AS/PBI.
Thanks for the consideration on this. More of a noob issue, or just one of those dumb things coders do sometimes that takes 30min to realize!
In 3.2.2 we no longer suggest calc item functions in the auto-complete dropdown, when not editing the expression/format string expression of a calc item.
I inadvertently used SELECTEDMEASURE() when creating a measure (I was in T/E 3) in addition to the calculation item, which of course did nothing. Only took me 30min to find my problem after all sorts of other troubleshooting steps.
Per SELECTEDMEASURE function (DAX) - DAX | Microsoft Docs though this "Can only be referenced in the expression for a calculation item."
If that is the case, it would be nice if T/E protected us from ourselves and gave us a red squiggly when used anywhere but inside a Calculation Item.
The text was updated successfully, but these errors were encountered: