Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I have a bar chart where my dimension is a concatenation of Date and Category, e.g. 06.03.2023 - A, 06.03.2023 - B...
My problem at the moment is that due to that concatenation I cannot sort the chart by date and therefore the start of my x-axis looks like this:
01.01.2023 - A
01.01.2023 - B
01.02.2023 - A
01.03.2023 - C
03.01.2023 - A
03.01.2023 - C
04.01.2023 - B
Is there a possibility to sort this concatenated dimension by date so that it looks like this:
01.01.2023 - A
01.01.2023 - B
03.01.2023 - A
03.01.2023 - C
04.01.2023 - B
01.02.2023 - A
01.03.2023 - C
Thank you very much in advance!
You could presumably do this by using a custom sort by Date, and also checking the String sort for the secondary (letter) sort. Alternatively, you could set this up as a dual() with a numeric value along the lines of num(Date)*100 + Ord(Category), which will sort first by the date value and then by the letter value when set to sort numerically.
You could presumably do this by using a custom sort by Date, and also checking the String sort for the secondary (letter) sort. Alternatively, you could set this up as a dual() with a numeric value along the lines of num(Date)*100 + Ord(Category), which will sort first by the date value and then by the letter value when set to sort numerically.
Hi Or,
thank you for your quick response. Do you have an example on how my Dual()-formula would look like?
At the moment my formula for concatenation looks like this: Date & '-' & Category.
Thank you!
Hi Or,
after trying around a little bit I solved the problem. In the option "Sorting" I used sorting by formula for my dimension and integrated the following formula:
=Num(Date)* 100 + Ord(Category)
Thank you very much for your support!