1 of 1 people found this helpful
This can be done with dash boarding, by using the parameter within a calculated field that would show the desired graph depending on the user's selection.
Set up a parameter that will hold the different views, in this case % of total records and number of records.
Create a calculated field that checks the parameter value and displays the dimensions accordingly
IF([parameter name] = '% of total records' THEN [Percent of total records] ELSEIF [parameter name] = 'Number of Records' THEN [Number of Records] END
Create two separate sheets for each graph, then place the two graphs side by side within your dashboard, each with your calculated field in your column field. Flipping the parameter control should display one graph at a time when titles are hidden.
Please let me know if you have any questions, or if you'd like me to demonstrate the solution, please attach your twbx file here.
Thank you for the reply. I've got the parameter control now correctly switching between viewing the data as counts and percent of total. However, one final piece I am struggling with is getting the data labels to change from whole numbers to percents as the chart switches. Right now when I switch to percents view the labels display as decimals like so:
I can change them to percents but then when I switch the parameter control back to counts I get all those >1 whole numbers trying to display as percents. Is there another calculation I can add that will change the formatting based on the parameter control? Thanks again.
To fix this you'll have to use a dashboard rather than a single graph, as you've done above. Split the IF statement into to separate calculated fields;
IF([parameter name] = 'Number of Records' THEN [Number of Records] END
IF([parameter name] = '% of total records' THEN [percent of total records] END
Place these on separate graphs with the desired axis (Number of records and percentages), and both of these sheets on the same dashboard, with the parameter control.
If done correctly, it should only display one or the other graph on the dashboard (I recommend putting them in a h or vbox together for sizing.)
Let me know if this helps!