Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am trying to create dynamic text descriptions below my chart that change based on what slicers are selected (or not selected), but I am running into a problem when there is no slicer selected.
My bar chart by default shows data for several demographic groups - e.g., male, female, white, black, hispanic. When nothing is filtered all the demographic groups will show. If the user only wants to see data for males and females they can select "sex" from the slicer and all the other demographic groups will be removed from the chart. I wanted to have text summaries below the chart that change based on the slicer selections; e.g., if they select "sex" - only the male/female values will show on the chart and the text below will describe the findings relevant to male or female. I was using the "Text Enhancer" from the marketplace to do this. This works well, but the problem occurs when nothing is selected in the filter. What I want is for the text corresponding to the "state" group in my table below to show, but instead if no filter is selected I can seemingly only choose to display the "first" or "last" text field, or a non-summarized version that shows all the rows of text.
Here's a mockup of the general idea of the text table.
Group Numb | Group | Text |
1 | Sex | First text summary |
2 | Race/ethnicity | Second text summary |
7 | State | Last text summary |
What I want is basically to say if the data are not filtered by group then use the description for the full state data - ('last text summary' in the chart).
I've done something like this before to get around the default outcome
Solved! Go to Solution.
Hi @TJ712 ,
Please try this measure:
PieFilter = IF(ISFILTERED('Prevalence Data'[Demographics (groups)]),SELECTEDVALUE('Prevalence Data'[Text]),CALCULATED(SELECTEDVALUE('Prevalence Data'[Text]),FILTER(ALLSELECTED('Prevalence Data'),'Prevalence Data'[Demographics (groups)]="State")))
Best regards,
Yuliana Gu
Hi @TJ712 ,
Please try this measure:
PieFilter = IF(ISFILTERED('Prevalence Data'[Demographics (groups)]),SELECTEDVALUE('Prevalence Data'[Text]),CALCULATED(SELECTEDVALUE('Prevalence Data'[Text]),FILTER(ALLSELECTED('Prevalence Data'),'Prevalence Data'[Demographics (groups)]="State")))
Best regards,
Yuliana Gu
That works. Thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |