Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
BekahLoSurdo
Resolver IV
Resolver IV

Column v. Measure

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 )

Column v. Measure.PNG

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!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@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.

I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Nathan Peterson

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@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.

 

I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Nathan Peterson

 

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?

Anonymous
Not applicable

@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.

I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.
Nathan Peterson

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.