In quicksight is it possible to color the lines dynamically based on an parameter selection. Let say I have an line chart where in the X(Axis) I have the create_date(count) is placed and I have added an control for the product as an parameter. So when an user selects one of the value from the product the color should automatically based on the value selected?
Please let me know if its possible and if yes what are the steps to it/
As mentioned above I have tried this approach earlier however when i place the product in the color field all the different product lines are appearing at a single time which is creating a mess when the selection is all in the control. So is it possible like when the selection is all products in the control only one line should appear that is combined metrics of all products. Also only based on selection the color should change? Let me know if I have provided my doubt clearly?
Hi @samytar97,
Sorry, I did not see anything originally regarding an option for ‘All’. You can achieve this through an ifelse calculated field though in the same way. The calculated field should look something like:
ifelse(
${Product1} <> "ALL_VALUES",
Product,
"All Products"
)
Then, to set your colors, change your parameter control to ‘All’, then you can edit field colors and set the color for your ‘All’ category. Apply that and then exit out of the field color menu. Change your parameter to one of the product options, then you can go back in to the ‘edit field colors’ section and you’ll be able to set colors for the other values.
Let me know if you have any further questions on this!
As you have mentioned I have tried to create the calculated field but I m getting the error as
Expression ifelse(
${Product1} <> “ALL_VALUES”,
Product,
“All Products”
) for function <> has incorrect argument type string list <> String. Function syntax expects ‘<COMPARABLE_TYPE>’.
I believe this error might be due to multi value parameter.
Hi @samytar97,
I did not know you were using a multi-value parameter, I do not believe this will be achievable in that way.
You’ll either need to use the work around by having a single value parameter or keeping a multi-value parameter but when you ‘select all’, it will populate every line as opposed to one combined line.