Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi experts,
I need help wrapping my head around Column v. Measure. It was always my understanding that a Column calculation was limited (for the most part, without special functions) to the current row while a Measure depended on the evaluation of a cell within the current context (including column selection, filters, slicers, etc.). What I am seeing with the CONTAINS function seems to be the opposite:
Column = CONTAINS( 'Table', 'Table'[Dimension], "DEF", 'Table'[Value], 456 ) Measure = CONTAINS( 'Table', 'Table'[Dimension], "DEF", 'Table'[Value], 456 )
The column seems to be evaluating the table as a whole and saying that my combination exists somewhere whereas the measure seems to be iterating row by row so what am I missing here?
I know this is more of a conceptual question but I'm hoping one of the experts can speak to the behind-the-scenes aspect as understanding these things is just as important as making a report just "work right" (and this has real world implications for a report of mine as well).
Thanks!
Solved! Go to Solution.
@BekahLoSurdo - It's a characteristic of the 1-Many relationship. The problem is that you can't assume that the "many" side will provide a single value - it can, but usually won't.
@BekahLoSurdo - Your observation is correct:
1. The Calculated Column evaluates the entire table. The function evaluates a table, and the column does not add a filter context.
2. Measures are always evaluated within a filter context. Each row of the table visual is filtered by the Dimension column. Therefore, the table is reduced to only those rows associated with the value for the dimension.
Thank you @Anonymous, this really helps. The only thing I'm still fuzzy on is why the Calculated Column is evaluating the table as a whole rather than giving the row level results. Is this just a characteristic of this particular function?
@BekahLoSurdo - It's a characteristic of the 1-Many relationship. The problem is that you can't assume that the "many" side will provide a single value - it can, but usually won't.
User | Count |
---|---|
117 | |
74 | |
62 | |
50 | |
46 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |