- 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

How to dynamically filter a table in PowerBI
I have a table in a data model which is like this :
PersonID ProgramID Status
1 P1 Completed
2 P2 Completed
3 Not Started
I want to represent this in a table visual such that when someone selects ProgramID = P1 in the slicer, the table looks like
PersonID ProgramID Status
1 P1 Completed
2 Not Started
3 Not Started
Any help on this will be very useful!?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi , @EshaanG
If help , please refer to these steps:
1.create a calculate table as a slicer:
Table 2 = DISTINCT('Table'[ProgramID])
2.create measure "Measure 2" as the field "ProgramID" ,measure"Statue measure " as the field "Status" to apply to the table visual
Measure 2 = IF(CALCULATE(COUNTROWS('Table'),'Table'[ProgramID] in DISTINCT('Table 2'[ProgramID]))>0,MAX('Table'[ProgramID]),BLANK())
Status measure =
IF (
CALCULATE ( COUNTROWS ( 'Table 2' ), ALLSELECTED ( 'Table 2' ) )
<> CALCULATE ( COUNTROWS ( 'Table 2' ), ALL ( 'Table 2' ) ),
IF (
CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[ProgramID] IN DISTINCT ( 'Table 2'[ProgramID] )
) > 0,
"Completed",
"Not Started"
),
MAX ( 'Table'[Status] )
)
it will show as below:
Here is a demo.
Best Regards,
Community Support Team _ Eason
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

Hello @v-easonf-msft
Thanks for the solution. It works pretty much fine in my actual data but somehow some the program column shows random values even though the final status and row count is accurate!
Shall I send a .pbix for you to have a look
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi , @EshaanG
Please tell me more details.You can upload the expected results or screenshots .
It will make it easier for me to understand your question if you can make a sample/ or share your pbix file without any sensitive data to me .
Best Regards,
Community Support Team _ Eason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello,
The sample .pbix is attached for your reference. If you see the screenshot below then if I select a Course then something else shows up in the table. Any help will be appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

You will need a disconnected table for your ProgramID values. Use that for your slicer. You can then use SELECTEDVALUE to get the selected value and use that in a measure to return the correct status.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
05-09-2018 07:13 AM | |||
12-20-2023 04:05 AM | |||
08-15-2024 05:12 AM | |||
Anonymous
| 08-11-2023 01:15 AM | ||
02-01-2022 09:08 AM |
User | Count |
---|---|
102 | |
84 | |
81 | |
53 | |
46 |