Forum Discussion
How to identify a chart in a DAX expression
I have several matrices that are very similar. For each one, the columns indicate Grade Level and the values indicate the percentage of students who participate in a particular program:
When a data point is selected, I'm going to display dynamic text to indicate what is being filtered, for example "Talented and Gifted" or "AVID". I can display the grade level with this expression:
IF(
ISFILTERED([Grade Level]),
CALCULATE(
CONCATENATEX(
ALLSELECTED([Grade Level]),
[Grade Level],
", "
)
)
, BLANK()
)
But how can I show "TAG" when the grade level on the TAG chart is chosen, and "AVID" when the grade level on the AVID chart is chosen? I tried creating measures for each, so they had different names I could refer to in the DAX.
Grade Level TAG = [Grade Level]
and
Grade Level AVID = [Grade Level]
That sort of worked, but it caused me to lose my cross-filtering abilities. If I chose Grades 6-8 on the TAG chart, the AVID chart would show the total number of Grades 6-8 students in AVID instead of the number of AVID students who are ALSO in TAG.
If I substitute [Percent TAG] and [Percent AVID] in my IF(ISFILTERED(... expression, the result is always BLANK(). What do I need to do to achieve my goal?