I am trying to anonymize data, except for the company that's selected in a filter.
Sample data is below:
| Company Name | Anonymous Name | [Calculated Column] |
|---|---|---|
| Coca Cola | Company A | |
| Wayne Enterprises | Company B | |
| Mr. Freeze's Ice Cream | Company C | |
| Riddler's Puzzle Palace | Company D | |
| Clark's Bars | Company E |
This table is linked to another, where the COMPANY NAME has some Dollar amounts in a column.
The idea is that I have a table that shows each company's total dollar amounts. BUT! If I select a company in a Filter, I want all other companies to use the "Anonymous Name".
For example, if I choose "Coca Cola" in my Filter, I want the table to be like below:
| Company Name | Values |
|---|---|
| Coca Cola | 1234 |
| Company B | 2233.39 |
| Company C | 12309 |
| Company D | 9087 |
| Company E | 2928 |
So far, I've seen that SELECTEDVALUE might be the approach, but I don't quite understand how it would work. I've tried this in my [Calculated Column] in the first table:
AnonCo = var _slicer = SELECTEDVALUE(myTable[Company Name], "Test?")
RETURN _slicer
But (perhaps obviously) that doesn't do anything when I choose a company in the filter.
What formula would I use to "swap out" the company names based on a Filter's selection?
Edit: I've also tried just ISFILTERED(myTable[Company Name]) but it returns FALSE even when I put a slicer with that column.


Wayne Enterprises), but I can't quite figure out how to like,=IF([company name]==[filteredValue],[Company Name],[Anonymous Name]if the Company Name is being filtered for, keep *that name* but use the random name for all others.