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
ADITYAGEDAM
New Member

Filter context change in Summarize and defined measure

I am learning DAX, Observed something weird,help me to understand -

I defined the measure as -

fIRSTYEAR MEASURE =
CALCULATE (
MIN ( 'Noble Prizes'[nobelPrizes.awardYear] ),
ALL ( 'Noble Prizes'[nobelPrizes.category.en] )
)

so when I make the table with the defined measure and Categories results to -

 

ADITYAGEDAM_0-1707155702575.png

which I understand completely.

but when I try to use the same measure in SUMMARIZECOLUMNS as -

 

Table 2 =
SUMMARIZECOLUMNS (
'Noble Prizes'[nobelPrizes.category.en],
'Noble Prizes'[nobelPrizes.categoryFullName.en],
"first year", [fIRSTYEAR MEASURE]
)

I get the following result when I make a table with first year -

ADITYAGEDAM_1-1707155937277.png

How do we justify the Economics Sciences First year, it's 1969 and 1901?

 Am I missing something?

 

 

 

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

you forgot the CALCULATE around the measure.

 

I recommend you install and use DAXDebugOutput.  Read about EVALUATEANDLOG, it is a fantastic tool to understand what DAX is doing on each step.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

you forgot the CALCULATE around the measure.

 

I recommend you install and use DAXDebugOutput.  Read about EVALUATEANDLOG, it is a fantastic tool to understand what DAX is doing on each step.

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.

Top Solution Authors