Forum Discussion
Filter on table visual
Hi,
I'm using two table visuals (not database tables):
- Table 1 displays data from all our test equipment for today.
- Table 2 shows data from the last 30 days.
What I want is: when I click on a row in Table 1, I’d like Table 2 to filter and show only the historical data for the same equipment and product—for example, Equipment "Test1" and Product "1111"—over the past 30 days.
However, currently when I click a row in Table 1, Table 2 only filters to a single day, instead of showing the full 30-day history for that equipment and product.
----------------------------------------------------------------------------------------------------------------------------------------------
Sorry for not being thourough enough. I will try to clarify my message.
Here is the database table
| Date | Equipment | Product | Yield | Pass | Fail |
| 2025-11-01 | Test1 | 1111 | 100% | 10 | 0 |
| 2025-11-02 | Test1 | 1111 | 50% | 5 | 5 |
| 2025-11-03 | Test1 | 1111 | 100% | 10 | 0 |
| 2025-11-04 | Test1 | 1111 | 50% | 5 | 5 |
| 2025-11-06 | Test1 | 1111 | 100% | 10 | 0 |
| 2025-11-01 | Test2 | 2222 | 50% | 5 | 5 |
| 2025-11-01 | Test3 | 3333 | 100% | 10 | 0 |
| 2025-11-01 | Test3 | 4444 | 50% | 5 | 5 |
| 2025-11-02 | Test3 | 5555 | 100% | 10 | 0 |
This is table visualisation for today:
With this filter.
This is table visualisation for the last 30 days:
With this filter.
If I click on this row on table 1:
I want all of these rows to be shown for table 2 that is related with the equipment and product.
Now I only get the same row in table2 as table 1 when i click on that row.
Hi TcT85,
Thanks for the follow-up question.
I reproduced the scenario again, and it worked on my end. I used it as sample data and successfully implemented it.
outcome:I am also including .pbix file for your better understanding, please have a look into it.
Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
12 Replies
- PijushRoyCommunity Champion
- grazitti_sapnaSuper User
Hi TcT85,
Try to remove date filter from table 2 and apply filter context from table 1, for e.g. product.
Try below query
ShowInLast30Days =
VAR SelectedEquipment = SELECTEDVALUE('TodayData'[Equipment])
VAR SelectedProduct = SELECTEDVALUE('TodayData'[Product])
VAR MaxDate = MAX('AllData'[Date])
VAR Last30Days =
DATESINPERIOD('AllData'[Date], MaxDate, -30, DAY)RETURN
CALCULATE(
[YourMeasure], -- e.g., SUM(AllData[Yield]) or COUNTROWS(AllData)
FILTER(
ALL('AllData'),
'AllData'[Equipment] = SelectedEquipment &&
'AllData'[Product] = SelectedProduct &&
'AllData'[Date] IN Last30Days
)
)If required you can remove the Date filter from table 2, add removefilters function.
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!- TcT85Helper III
Hi grazitti_sapna ,
I can't get it to work. I added this measure to table 2 and removed date filter from table 2. I have edited my message for better clarification.
- Shubham_rai955Super User
Create this measure in your data model:
Yield_Filtered_30Days = CALCULATE( SUM(YourTable[Yield]), -- Or your original measure ALLEXCEPT( YourTable, YourTable[Equipment], YourTable[Product] ) )Why this works:
Keeps filter context on Equipment and Product.
Removes any filter on Date, so Table 2 continues to show 30-day history.
No changes needed to relationships or visuals.
How to use:
Use this measure Yield_Filtered_30Days in Table 2 instead of original Yield.
Clicking a row in Table 1 applies filters only on Equipment and Product.
- TcT85Helper III
I have tried your measure but I cant get it to work, maybe I have explained my issue to vague, I have updated my message above for better clarification, sorry for the inconvience.
- Praful_PotphodeSuper User
Hi TcT85 ,
the information is bit in complete.but i will try to share the steps.
- Create a measure for rowcount or count which will take common column or dimension between 2 tables
- then select table 2 and add measure created in step 1 to visual level filter
- add condition measure is greater than 0 in visual level filter
Please find sample pbix file for reference.Sampl PBIX
Give kudos or mark it as solution once confirmed.
Thanks and Regards,
Praful
- TcT85Helper III
- Praful_PotphodeSuper User
- v-kpoloju-msftCommunity Support
Hi TcT85,
Thank you for reaching out to the Microsoft fabric community forum. Also, thanks to Praful_Potphode, Shubham_rai955, grazitti_sapna, PijushRoy, for those inputs on this thread.
I reproduced the scenario, and it worked on my end. I used it as sample data and successfully implemented it.
Sample data:
Dax Measures:
Yield Today:Yield Today = DIVIDE([Pass Today], [Pass Today] + [Fail Today])
Pass Today:Pass Today = CALCULATE( SUM(Data[Pass]), Data[Date] = DATE(2025,11,6) )
Fail Today:Fail Today = CALCULATE( SUM(Data[Fail]), Data[Date] = DATE(2025,11,6) )outcome:
I am also including .pbix file for your better understanding, please have a look into it.
Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
- TcT85Helper III
I got to it work with the fictional datatable i shared with you, but when i try with my real data it''s not working.
Is it because the data is in this order ?
Equipment Product SerialNumber Status Date Test1 1111 0001 Pass 2025-11-07 Test1 1111 0001 Fail 2025-11-06 Test1 1111 0002 Pass 2025-11-06 Test1 2222 0003 Pass 2025-11-06 - v-kpoloju-msftCommunity Support
Hi TcT85,
Thanks for the follow-up question.
I reproduced the scenario again, and it worked on my end. I used it as sample data and successfully implemented it.
outcome:I am also including .pbix file for your better understanding, please have a look into it.
Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.