Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am using an if statement to set colours on a pie chart. Which all works fine until i make a selection. The pie still works as it uses set analysis but colours go when a date selected.
Pie Chart Expression:
=Count({<Pre={'Full Duties'},ReferFRP={'0'},Month=,SelectYear=,Completedcase={'-1'},Dischargedflag={'1'}>}[Main Cat])+ Count({<Pre={'Restricted Duties'},Dischargedflag={'1'},ReferFRP={'0'},Month=,SelectYear=,Completedcase={'-1'}>}[Main Cat])+Count({<Pre={'Off Work'},Dischargedflag={'1'} ,ReferFRP={'0'},Month=,SelectYear=,Completedcase={'-1'}>}[Main Cat])
Background colour: If(Pre='Full Duties',RGB(0,255,0),If(Pre='Restricted Duties',RGB(255,191,0),If(Pre='Off Work',RGB(255,0,0))))
Can anyone offer any suggestions?
Many thanks
Paul
Please check persistent colors option from color tab of your chart
Makes no difference unfortunately.
Try putting =PRE in a textbox and see what happens when you make a selection. Is PRE a field or a variable? If a field, how it associated with dates? If a variable, how is it defined?
What dimension you have used in pie chart and have you created month and selectyear from date that you are selecting?
Pre is a dimension. Yes created a master calendar that this ignores in the expression. when date is selected though it is removing colours as that field now not available. thx
Yes thats how i found the issue. Pre is associated with dates so that why i exclude from expression but cant exclude from colours. thx Paul