I have been following the @ approach and advocating others to follow this since the article came out, the best part of following this practice is the ability to quickly reference the columns otherwise I had to write a lot of characters to search for the required columns! Thanks!
@ThepExcel
3 жыл бұрын
i think your solution using @ is already the best one
@pavelhanus8819
Жыл бұрын
Great idea, thank you. I have question not related to @ but to the typing as well. Why to use "," (comma) at the end of the line instead of the beginning of new one (It is easy to comment thinks out when I have it as the first sign on new line). Thank you Pavel
@SQLBI
Жыл бұрын
DAX Studio has a feature to temporary move the comma at the beginning of the line. It should be temporary, because the comma at the beginning of the line is really ugly. :)
@AgulloBernat
3 жыл бұрын
Do you have any rule for variable names? Sometimes the obvious name is the same of a column or a measure. Should we avoid that? Some people add underscores in the front, but I've never seen that in your code
@SQLBI
3 жыл бұрын
It depends. We try to put clarity in sample code, in complete models using initial underscores is a practical way to avoid conflicts with table names.
@sandeepbarge4699
3 жыл бұрын
Thanks for the video! Long pending question that I had in my mind but never asked is now answered.
@Anthony_Lecoq
3 жыл бұрын
That is a wonderful tips, i would have save time last week ;) Thank you
@Turbo_PilotSky
3 жыл бұрын
Excellent idea, as usual! Thank you Alberto!
@nebula12able
3 жыл бұрын
Nice Idea! Sure will follow this standard
@DIGITAL_COOKING
3 жыл бұрын
I prefer following the experts:)
@bipower6915
3 жыл бұрын
It's a good idea to make the code more readable!
@AgulloBernat
3 жыл бұрын
If you store a filtered table in a variable you are out of luck right? you have to use the [ ]notation and have no way of saying "hey, that's actually a column." I guess you could always use a SELECTCOLUMNS to name things, but is that the only way? (would you put an @ in front of EACH column??) just found myself on the situation and thought of this video again :D -- Maybe it's good practice to use select columns and take along only the required columns, right? all with @ in the front...
@SQLBI
3 жыл бұрын
If a table includes columns with a valid data lineage, those columns keep the table and column name of the original column, so there is no need to rename it.
@ivanovdmitry770
3 жыл бұрын
Good day! At 1:45 you show the code of measure [ABC Sales Amount], do you have a video where you analyze the code of this particular measure in detail?
@SQLBI
3 жыл бұрын
See here: www.daxpatterns.com/abc-classification/
@sane7263
2 жыл бұрын
I always follow this notation and it is pretty easy to read. Question is should we also use this when we create columns on the fly using other Functions ?
@SQLBI
2 жыл бұрын
It makes sense for columns you create for internal calculations, as it is always the case in measures and calculated columns. Not a good idea for columns you produce as output, like in DAX queries or in calculated tables.
@sane7263
2 жыл бұрын
@@SQLBI I was talking about creating virtual Table Columns in measure using something like say SelectColumns
@SQLBI
2 жыл бұрын
Indeed, virtual table columns = internal calculations in measures.
Пікірлер: 24