Forum Discussion
ALLSELECTED on Calculated Column not working
- 6 years ago
Borrek , try removefilters
removefilter(Table[payment status])
refer example on
https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
Hi, thanks for answering but this eliminates all filters - I need to eliminate only payment status filter.
What is wired that the only difference between working and not working formula is the column. If I use column imported from database (and change legend in chart respectively) it works. If I change both to calculated column (SWITCH function on imported column) it does not.
I read about shadow filter so I also tried to insert both columns in ALLSELECTED but it does not work as well.
- amitchandak6 years agoSuper User
Borrek , try removefilters
removefilter(Table[payment status])
refer example on
https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
- Borrek6 years agoFrequent Visitor
The problem was that ALLSELECTED should be not only imposed on payment_type calculated column but also calculated column that was used to sort payment_type column.
Not sure why but sorting by other column affected contex filters of column I used. I was able to find it by removing filters.
From my point of view such situation is counterintuitive but this is how it works.
- jackl21an1 year agoRegular Visitor
I also found this worked; when I included 2 ALLSELECTED statements, one for the dimension and the other for the column I was using to sort the dimension (used to sort the legend in a bar chart). Slight difference to yours is that in my case they were both were held in a separate reference table with a relationship on a calculated column in the main dataset.