Forum Discussion
dphillips
Helper IV
2 years agoMeasure using filters on fields from related table
I have a 'Students' table which has a unique set of students. The fields include a StudentID, Name, Yearlevel, MentorGroup and Fileyear. I then have a related table called 'Merits' which has all the ...
- 2 years ago
Hi dphillips
Would these measures help?
Avg = AVERAGEX( FILTER( ALL( 'Student' ), 'Student'[Fileyear] = MAX( 'Student'[Fileyear] ) && 'Student'[YearLevel] = MAX( 'Student'[YearLevel] ) ), [TotalMeritsThisYear] ) MaxStudent = MAXX( FILTER( ALL( 'Student' ), 'Student'[Fileyear] = MAX( 'Student'[Fileyear] ) && 'Student'[YearLevel] = MAX( 'Student'[YearLevel] ) ), [TotalMeritsThisYear] )On Page 2, you'll notice that [Avg] and [MaxStudent] change as [YearLevel] changes. Also, you can compare the numbers to those on Page 1 where you can set slicers.
- 2 years ago
Hi,
PBI file attached. I get 14 as the answer in the card visual.
Hope thish helps.
gmsamborn
Super User
2 years agoHi dphillips
Would these measures help?
Avg =
AVERAGEX(
FILTER(
ALL( 'Student' ),
'Student'[Fileyear] = MAX( 'Student'[Fileyear] )
&& 'Student'[YearLevel] = MAX( 'Student'[YearLevel] )
),
[TotalMeritsThisYear]
)
MaxStudent =
MAXX(
FILTER(
ALL( 'Student' ),
'Student'[Fileyear] = MAX( 'Student'[Fileyear] )
&& 'Student'[YearLevel] = MAX( 'Student'[YearLevel] )
),
[TotalMeritsThisYear]
)
On Page 2, you'll notice that [Avg] and [MaxStudent] change as [YearLevel] changes. Also, you can compare the numbers to those on Page 1 where you can set slicers.