Solved

Wrong definition of measures in semantic models

  • 26 January 2023
  • 2 replies
  • 83 views

Userlevel 3
Badge +1

Whwn you define a measure, like a Sum:

 

The internal DAX expresion it’s wrong (but it works) as you can see with tabular editor:

 

icon

Best answer by fwagner 26 January 2023, 18:40

View original

2 replies

Userlevel 2
Badge +3

Thanks for your question @rvgfox !

While the auto generated DAX measure does indeed not adhere to the best practice of fully qualifying the column with the table name, the code is not wrong (and works, as you mentioned).

As for my knowledge, the best practice was introduced and is propagated in the community mostly to be able to distinguish between other measures (that are supposed to be not fully qualified, but can), and table columns (that are supposed to be fully qualified, but don’t have to).

In the context of automatically generated models, you could say that this distinction is less important than when you code manually.

As a fellow big fan of adhering to DAX best practices, I have forwarded your suggestion to our product team 😎

Bonus points are always awarded for using TabularEditor by the way 👍

Userlevel 6
Badge +5

Hi @rvgfox 

Can you please help us mark the best answer if you are satisfied by Frank’s answer above?

Many thanks!

Reply