0

Is it possible, in a DAX measure, to check if the current query contains a particular column?

For example, I have a column named "Time" - is it possible to detect if a user in a self service environment has included this in their report, from the measure?

Edit - adding example of an output

An example output would be below

+---------+---------+------+--------------+
|  Col1   |  Col2   | Col3 | ContainsCol3 |
+---------+---------+------+--------------+
| Value 1 | Value 2 |  123 | True         |
+---------+---------+------+--------------+

+---------+---------+------+--------------+
|  Col1   |  Col2   | Col4 | ContainsCol3 |
+---------+---------+------+--------------+
| Value 1 | Value 2 |  123 | False        |
+---------+---------+------+--------------+

The query containing Col3 returns true, the query that does not include col3 returns false.

Neil P
  • 2,920
  • 5
  • 33
  • 64

1 Answers1

1

not exactly, but you can use functions like ISCROSSFILTERED, ISFILTERED, HASONEFILTER, HASONEVALUE which might be sufficient depending on your end-goal.

Bill Anton
  • 2,920
  • 17
  • 23
  • Unfortunately, my end goal is a bit of a hack to switch out the underlying column of a measure if a certain dimension column is included. ISCROSSFILTERED sounds like it may get me close, but in all likelihood there wouldn't be a filter on the column and therefore I might not be able to detect it. – Neil P Oct 26 '17 at 13:25