Forum Discussion

Topographical's avatar
Topographical
Frequent Visitor
8 years ago
Solved

A Conceptual Issue I keep having

I keep having an issue whereby I need to access a column in a measure. So for example, I have data grouped by date, and then grouped by ID, and then further grouped by Type.    I have encountered a...
  • Anonymous's avatar
    Anonymous
    8 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.