Forum Discussion
A Conceptual Issue I keep having
- Anonymous8 years ago
You might be going wrong in how you think about Columns and Measures. Measures aren't written to consider each "cell" individually. If you need to make row by row calculations, thats what Columns are meant for, however they only calculate once during the data load. Instead Measures take in a context that can change, and give a result based on the group of data as a complete whole.
Now of course, in your design, you might know of certain logic constants. For example, if you know you are doing some form of context filtering which will only ever give you a single date in your range, you might include a statement like "FIRSTDATE('Table'[Column]) because you know you'll get the correct answer every time.
You might be going wrong in how you think about Columns and Measures. Measures aren't written to consider each "cell" individually. If you need to make row by row calculations, thats what Columns are meant for, however they only calculate once during the data load. Instead Measures take in a context that can change, and give a result based on the group of data as a complete whole.
Now of course, in your design, you might know of certain logic constants. For example, if you know you are doing some form of context filtering which will only ever give you a single date in your range, you might include a statement like "FIRSTDATE('Table'[Column]) because you know you'll get the correct answer every time.
Thanks for this. I guess I should also try to just play around compare the expected behaviour with what DAX is actually doing.