Forum Discussion
Dynamic Text for a Drill Through
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).
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 agoSuper 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.
- SusanRay2 years agoHelper I
I really appreciate your help with this.
A trimmed-down copy of my project is available here: https://drive.google.com/file/d/1VmMU6fkARoUMBoOB2gvbr6YokO6hh_xb/view?usp=sharing
I added some text boxes on the various pages describing what I hope to see and what I have tried so far.
I feel like I must be missing something obvious because I cannot be the only person with this project requirement.
- gmsamborn2 years agoSuper User
Hi SusanRay
After looking at your pbix, I'm unsure how/where you are using [Drillthrough Title Piece].
Regardless, would this help?
Drillthrough Title Piece = VAR _ColorParm = SELECTEDVALUE( 'Color Parameter'[Color Parameter] ) RETURN IF( _ColorParm = "Overall", "Overall", IF( _ColorParm = "Gender", SELECTEDVALUE( 'Student Bio Demo'[Gender] ), IF( _ColorParm = "Race/Ethnicity", SELECTEDVALUE( 'Student Bio Demo'[Ethnicity Race Group] ), IF( _ColorParm = "Minority", SELECTEDVALUE( 'Student Bio Demo'[Minority] ), SELECTEDVALUE( 'Student Bio Demo'[Residency level] ) ) ) ) )