muzz Posted April 10, 2022 Posted April 10, 2022 (edited) I would like to display a chart showing performance scores for some shoulder tests as a proportion of affected to unaffected limb with achievement of 100% meaning they have reached their goal - I don't need to show any more than the target set by the unaffected limb. I have been able to get what I want on 2 separate charts, one for testing if the LEFT side is affected and one for when the RIGHT side is affected but I can't get it to work in the one chart (see file attached). I could use "Hide object when" to display the relevant chart but what I would like is to show the two scenarios on one chart but I haven't been able to get close - it's doing my head in but I'm sure there must be a single calculation that will do it - I'm hoping for some help! What I need is the following: Scores will be added (a counter) over a minutes duration - if the LEFT side is affected, show the proportion of the left score compared to the right score until they are equal, i.e. if the left score is greater than the right, cap the displayed proportion so the chart shows 100%. Similarly, if the RIGHT side is affected, show the proportion of the right score compared to the left score until they are equal - if the right score is greater than the left, cap the displayed score so the chart shows 100%. If I don't cap the score as above, it seems unclear on the chart as to whether to difference in score is a positive or negative - it's not my intention to display the text information on the chart, just the LEFT and RIGHT coloured segments in proportion. As mentioned I have managed with one chart for the left and a separate chart for the right - I feel like it should be easier than I thought but if anyone can help I'd be grateful. Cheers, Murray PieChart.fmp12 Edited April 10, 2022 by muzz Clarification
comment Posted April 10, 2022 Posted April 10, 2022 If I followed your description correctly (?), you want to calculate the slice data as = Let ( [ affectedScore = If ( PieChart::AffectedSide = "Left" ; PieChart::Score Left ; PieChart::Score Right ) ; otherScore = If ( PieChart::AffectedSide = "Left" ; PieChart::Score Right ; PieChart::Score Left ) ] ; List ( affectedScore ; If ( affectedScore < otherScore ; otherScore - affectedScore ) ) )
Recommended Posts
This topic is 949 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now