Forum Discussion
Dynamic Text for a Drill Through
Does this help? I think it was just a matter of incorrectly placed parentheses.
Drillthrough Title Piece =
IF(
'Color Parameter'[Value] = "Overall",
"Overall",
IF(
'Color Parameter'[Value] = "Gender",
SELECTEDVALUE( 'Student Bio Demo'[Gender] ),
IF(
'Color Parameter'[Value] = "Race/Ethnicity",
SELECTEDVALUE( 'Student Bio Demo'[Ethnicity Race Group] ),
IF(
'Color Parameter'[Value] = "Minority",
SELECTEDVALUE( 'Student Bio Demo'[Minority] ),
SELECTEDVALUE( 'Student Bio Demo'[Residency level] )
)
)
)
)
Thank you for the response, gmsamborn .
Unfortunately, that did not work. The error message says "The syntax for 'Value' is incorrect."
- gmsamborn2 years ago
Super User
Hi SusanRay
I was just going by your definition for [Drillthrough Title Piece]. In you definition, you refer to Color Parameter without using quotes (ie. 'table') or square brackets ( ie. [measure] ). I have no way of knowing if that is a measure or a table (or even a column).
- SusanRay2 years ago
Helper I
Hello gmsamborn ,
I apologize if I wasn't clear. I am still very new to Power BI and Dax.
Color Parameter is just that, a parameter. ( a 'fields' parameter if that helps)
My use case:
I have one page with a stacked bar graph that changes the legend colors based on the Color Parameter selection (Gender, Race/Ethnicity or Residency, etc.).
A user can select a portion of a bar and drill through to another page. That page, of course, only shows data relevant to the particular bar and color selected.
I need a way to title the drill-through page that clearly indicates what was selected on the previous page (for example "Male" or "Asian" or "In-State"). The exact verbiage will vary depending on which parameter was chosen.
I am struggling to find the correct DAX syntax for that purpose.
Does any of that make sense?
- gmsamborn2 years ago
Super User
Hi SusanRay
Is there any way you could come up with a sample report with fictional data and any past attempts at a solution?
1) Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...2) Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/14475233) Please explain how you would expect to get from step 1 to 2.
4) If possible, please show your past attempts at a solution.