The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
This is my sample table :
Student | Subject | Marks |
A | English | 1 |
B | English | 2 |
C | English | 3 |
I have two separate slicers on my page student and subject and selected Student "A" & Subject "English"
Student | Subject |
A | English |
Excepted Result:
Student | Subject | Student A Marks | Average of B & C MARKS |
A | English | 1 | 2.5 |
Please suggest a Dax formula for this requirement.
Solved! Go to Solution.
@nagendrakumar Try this:
Measure =
VAR __Student = MAX('Table'[Student])
VAR __Subject = MAX('Table'[Subject])
VAR __Table = FILTER(ALL('Table'), [Student] <> __Student && [Subject] = __Subject)
RETURN
AVERAGEX(__Table,[Marks])
@nagendrakumar Try this:
Measure =
VAR __Student = MAX('Table'[Student])
VAR __Subject = MAX('Table'[Subject])
VAR __Table = FILTER(ALL('Table'), [Student] <> __Student && [Subject] = __Subject)
RETURN
AVERAGEX(__Table,[Marks])
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |