Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a bar chart in dashboard. I need to display sum of sales for region wise and sales prediction.
Now sales prediction has three values:
1. Win
2. Risk
3. Other
The sum of sales should not affect when sales prediction is selected and sales_Person is selected.
So I am using :
sum({<Sales_Prediction=,sales_Person=>} sales)
My first dimension is Region and second in Sales_Prediction. I am using stacked bar chart.
Now I need to color the bar chart as if sales prediction is WIN then Color_1, if RISK then Color_2 and if Other then Color_3.
I am using background color in expression to provide color in bar chart as per sales prediction.
My problem is:
When I am selecting the sales person for whom sales prediction is OTHER, the data in bar chart is not changing (Whis is right), but the color of the bar chart is changing to OTHER sales prediction color.
Is there any way to make the color of the bar chart constant.
I am not supposed to use Alternate state.
Thanks for your help
I have mistaken, you must past in the background color expression of your expression.
I have fixed your issue with using Only({<Sales_person=>} Color_pred) in the background color expression.
See the attached qvw file.
Regards
Hi,
Should work with table color in your load statement.
Create a table color with the RGB value for each value of Sales_Prediction
COLOR_PRED:
LOAD *
,rgb(R,G,B) as Color
INLINE [
Sales_Prediction,R,G,B
Win,0,234,0
Risk,2,223,130
Other,205,255,155
];
Put Color in the background color expression of your second dimension Sales_Prediction.
What is the background expression that you are using?
Hi Jean,
Thanks for your reply.
So the field Sales_Prediction in inline table will linked to my table.
In this case color will change when I will select sales person who has sales prediction as OTHER.
I do not want bar color to change when I select sales person from list.
Please correct me if I am wrong.
Hi Sunny,
I am using IF else condition for Bar color.
I have mistaken, you must past in the background color expression of your expression.
I have fixed your issue with using Only({<Sales_person=>} Color_pred) in the background color expression.
See the attached qvw file.
Regards
What does that if then else statement look like
Hi Jean,
Thanks for your help. I am able to achieve this.