Hi all --
This is the issue I am working with:
I am creating a dashboard where first you select a person, then you have a variety of other more specific filters to view the data. However, the handedness of the person is important to the data that is being displayed. For example, I have right-handed people, left-handed people, and ambidextrous people -- for which you can look at left-handed data OR right-handed data (but viewing both at once is not what I am looking to do.) So, I have a filter for handedness, where currently you select a person, and then there is a drop-down menu for handedness with Left or Right as an option. However, if you select a person who is left-handed, and the handedness filter is currently selected as right, everything shows up blank until that is changed to left.
So the solution I would like is:
To have the handedness filter default to whatever the "mode" is for the handedness in the data. So, for example, if you select a left-handed person, since all of their data is listed as Left, left would automatically be selected when you select their name. Same with right-handed people. For ambidextrous people, whichever they have more of would be the default. So if they have 300 total rows of data, of which 200 are left-handed and 100 are right handed, the default would be left, but you could go to the handedness filter and change that to right if you'd like.
I have already created calculated fields to grab the most-frequent handedness, which is as follows:
LH:
Case [Handedness]
When 'L' then 'Left'
End
RH:
Case [Handedness]
When 'R' then 'Right'
End
Top Handedness:
If Count([LH]) > Count([RH]) then 'Left'
Elseif Count([LH]) < Count([RH]) then 'Right'
End
Using Top Handedness itself as the filter does not allow to toggle between handedness for those ambidextrous people (which there are a lot of in the data). So, I'm not sure if there is a way to use this calculated field in another way to be able to have the option to toggle between handedness, but make the Top Handedness the default when switching to a new person.
I hope this makes sense, and if you have questions I am happy to answer. Unfortunately not able to attach a workbook as it is sensitive company data. However I hope the information provided is enough. Thank you in advance for the help!
Megan,
Thanks for posting that workbook. Here's a bit of a "hack" that, I think, will address your issue.
1. First, create that Dominant Hand calculated field, similar to what you suggested in your original post. Here's what mine looks like:
And if we place it on a viz, we can see that it produces the correct results for each of our subjects:
2. Next, create a parameter that the user will use to select which handedness they want to see in the chart:
3. Create two calculated fields to count the number of records with each kind of handedness for each person:
4. Create a calculated field to determine which handedness to show - either show the handedness selected by the user, or if that individual does not have that handedness, then just show the dominant handedness:
5. Then, create a calculated field to determine what records to include in the charts:
6. Now, on each of the charts, the items on your filter shelf should be the Name, and the Handedness To Show - set to show only True values:
7. Also, I would change the title of your chart to include some text indicating which handedness is being shown, like this:
8. Finally, on your Dashboard, remove the Handedness filter, and instead show the parameter control for the Selected Handedness, so that you see the following - note, in the screenshot shown, we have Joe selected, who only has Right hand records, and the Selected Handedness is set to L, but the chart is showing the R values for Joe - and this is made clear by the title:
Hope that helps. I realize it's not exactly what you were trying to achieve, but hopefully it's a workable solution.
Kaz.