PDA

View Full Version : In a measure, how do I change a row context into a filter context for a text column?



Charley
2019-09-18, 06:39 PM
When I use a FILTER function in a measure, how do I filter on a column of text in the current row?

Said another way, how do I change the row context into a filter context for a column of text?

Said still another way, how do I return the textual VALUE from the current row of a column of text?

Thanks.

AliGW
2019-09-20, 06:58 PM
Erm ... :confused2:

Charley
2019-09-21, 05:00 PM
Here's the solution:


FILTER (
ALL (GetTable1),
GetTable1[Text]
= VALUES(GetTable1[Text])
&& GetTable1[Numeric] = VALUES(GetTable1[Numeric])
)

For the numeric value, one would normally use MAX, but VALUES works as well. And VALUES appears to be the only function that Excel can use to return the value of the text in the current row.

Charley