Forum Discussion
PatMic090
2 years agoFrequent 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.
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
- amitchandakSuper 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
- PatMic090Frequent VisitorThanks 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.