Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |