Grazia Palmisano Posted June 15, 2020 Share Posted June 15, 2020 Hi all, i need to rename the values of[Axis.Default.Names] (n.2 distinct value) because the name of my (Column Names) change in base of a Document propery. For example with a drop down list i choose a year (2020, 2019, 2018,...) so my column name is the value selected and the previous year. So if i choose 2020 my column names are 2020, 2019 if i choose 2019my column names are 2019, 2018 If i set color by (Column names) color change every time i selected a new year, instead, i want 2 fixed color (one for the first yaer and the second for the previous year). How can i do it Thank you Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted June 15, 2020 Share Posted June 15, 2020 Hi Grazia, Can you share your (test) dxp So I can see how you have setup your visualization Kind regards, David Link to comment Share on other sites More sharing options...
Grazia Palmisano Posted June 15, 2020 Author Share Posted June 15, 2020 Sorry but I can't attach my dxp. I set value property as : ${MeasureCY} AS [${VersionCY}], ${MeasurePY} AS [${VersionPY}]where:VersionCY= current year selected VersionPY=VersionCY-1(In this way in the legend i show the exact years compared and not another alias)So, my (column names) change every time i select a different year, so I can't set the color by because it will change when user will choose another year. Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted June 16, 2020 Share Posted June 16, 2020 Hi Grazia, It is a bit hard to see what you are trying to do without a visual. I have tried to set up a dxp in which I use a dropdown list on year, resulting in one document property. This property is used in two measures; Current year and Previous year. If I plot these two calculated columns in a bar chart and color code them, the colors will always be the same whenever I change the selected year from the drop down. Please have a look at the attached dxp and see if it fits your dashboard (or purpose). Kind regards, David Link to comment Share on other sites More sharing options...
Grazia Palmisano Posted June 16, 2020 Author Share Posted June 16, 2020 I upload your example with my modifications in order to clear my issue. Thank you so much Link to comment Share on other sites More sharing options...
Grazia Palmisano Posted June 16, 2020 Author Share Posted June 16, 2020 I upload the example of David with my modifications in order to clear my issue. Thank you so much Grazia Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted June 16, 2020 Share Posted June 16, 2020 Hi Grazia, I see the issue. It's coming from the fact that the years are considered as different values. Where in my example, the values are always Previous Year and Current Year, you have (at least) three values. These three values are color coded in the same color, but when selected one year and then another, you will see the changing of colors. You can choose for the Current Year/Previous Year option and add the selected years in the title of the bar chart. But you can also use an iron python script to color code the individual values. Note that this one always keeps swithcing colors as well, but you can choose only two colors to colorcode all your year values. In the attached example, you will find both solutions. Kind regards, David Link to comment Share on other sites More sharing options...
Recommended Posts
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