- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to filter excel table in Power BI directly to make calculations
I have a PowerBI Project with an excel sheet containing 4 columns.
1. Country
2. Subject
3. Student Name
4. Student Score
I have another table with the following:
1. Country
2. Subject
3. Student Name
4. The Peers
The peers are all the students which are the peers to the current selected student. So the score is calculated from the first excel table.
What I want to do is,
in PowerBI, if I select the Student Country and Name, PowerBI automatically filters it in the second table and Find the Peer Names.
So I can calculate the Peer Scores from the first table. As of now, I have to manually enter the Peer Names in table 2 (From where the list is being fetched). How can I do it? is there a possibility of a virtual table or something?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the solution lbendlin offered, and i want to offer some more information for user to refer to.
hello @Anish7117 ,you can refer to the following sample.
Sample data
Table
Table(2)
You can create the following meaures
MEASURE =
VAR a =
CALCULATETABLE (
VALUES ( 'Table (2)'[The Peers] ),
ALL ( 'Table (2)' ),
'Table (2)'[Country] IN VALUES ( 'Table'[Country] ),
'Table (2)'[Student Name] IN VALUES ( 'Table'[Student Name] )
)
RETURN
CALCULATE (
SUM ( 'Table'[Student Score] ),
ALL ( 'Table' ),
'Table'[Student Name] IN a
)
Measure 2 = SUMX(VALUES('Table'[Student Name]),[Measure])
Then put the measure2 to the visual.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the solution lbendlin offered, and i want to offer some more information for user to refer to.
hello @Anish7117 ,you can refer to the following sample.
Sample data
Table
Table(2)
You can create the following meaures
MEASURE =
VAR a =
CALCULATETABLE (
VALUES ( 'Table (2)'[The Peers] ),
ALL ( 'Table (2)' ),
'Table (2)'[Country] IN VALUES ( 'Table'[Country] ),
'Table (2)'[Student Name] IN VALUES ( 'Table'[Student Name] )
)
RETURN
CALCULATE (
SUM ( 'Table'[Student Score] ),
ALL ( 'Table' ),
'Table'[Student Name] IN a
)
Measure 2 = SUMX(VALUES('Table'[Student Name]),[Measure])
Then put the measure2 to the visual.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is a standard "Filtering Up" pattern. Read about REMOVEFILTERS. You only need one table.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
05-24-2023 10:49 PM | |||
02-16-2024 06:57 AM | |||
03-20-2024 03:19 PM | |||
09-14-2023 08:08 AM | |||
04-09-2024 03:47 AM |
User | Count |
---|---|
30 | |
25 | |
24 | |
13 | |
9 |
User | Count |
---|---|
24 | |
19 | |
16 | |
13 | |
9 |