Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PatMic090
Frequent Visitor

How to create calculated table removing filter context

Hello, 

 

I have filter used on all page.  I've been able to create a measure removing this filter from specific column, however I struggle to create a calculated table based on that.

My measure:  

Selected data = CALCULATE(COUNT(LocationReporting[LocationReportingDesc]), LocationReporting[League] =MAXX(LocationReporting,selectedvalue('LocationReporting'[League])), REMOVEFILTERS(LocationReporting[LocationReportingDesc]))
 
That's only the calculation that I've been able to made, I don't need count. What I actually need is column with these LocationReportingDesc values where filter is applied only on League, but not on LocationReportingDesc.
I hope that makes sense. LocationReportingDesc is individual store, League is higher in the hierarchy.
What I was trying to do so far based on the measure: 
table2 =
VAR SelectedLeague = MAXX(LocationReporting, SELECTEDVALUE(LocationReporting[League]))
return
    CALCULATETABLE(SELECTCOLUMNS(LocationReporting, "Desc", LocationReporting[LocationReportingDesc]),
    MAXX(LocationReporting, ALLSELECTED(LocationReporting[LocationReportingDesc]) = SelectedLeague
    )
)
2 REPLIES 2
amitchandak
Super User
Super User

@PatMic090 , Table can not use filter or slicer values.

 

You can create a column like

 

COUNTX(filter( LocationReporting,  LocationReporting[League] = earlier('LocationReporting'[League])),LocationReporting[LocationReportingDesc])

 

Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for your reply. I see that the function you mentioned worked, but it's counting the stores. Do you know how the actual names can be returned in a column? Sorry if I misunderstood something.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.