Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
my requirement is , dynamic sorting in bar charts. like high to low (and) low to high (and) Alphabetic order. Which should given to user after development of chart.
User should able to sort the chart.
thank in advance.
Hi - i did get this to work.
1. Build a 2 row (or more) data island table in the data model with each row determining a 'format code'
Format:
load
if(RowNo()=1,'Percentage','Integer') as Format
AutoGenerate 2;
2. Build a variable to determine the numeric format based on the selection:
set vFormat='if(Only(Format)=' & chr(39) & 'Integer' & chr(39) &',' &chr(39)& '#,##0' & chr(39) & ',' & chr(39) & '#,##0%' & chr(39) & ')';
3. Invoke the variable in the 2nd argument of the num() function to dynamically determine the format.
change measure expression from:
sum(Sales)
to:
num( sum(Sales), $(= chr(39) & $(=$(vFormat)) & chr(39)) )
and leave format to 'auto
Please remember to mark this as "helpful" & "correct answer" if your query has been solved.
This will help users identify the answers should they come across this thread in the future.
Regard's
Sarvesh Srivastava
From User Prospective, I don't think whether we do have option to enable the Sort icon on Dimension prospect
But, You can do from Sort tab what ever you wish
HI,
If the sorts are based on Dimension (Alphanumeric) and Expression (SUm(sales)). Then
one way is to create a INLINE table and use it in front end with the help of 3 charts .
LOAD * INLINE [
TypeOfSort
Alpha,
ASC
DSC
];
Upon selection of TypeOfSort add an action to set a variable (vSortOrder) and use the same in chart Layout --> conditional Display.
hi sasik,
what u said is correct and we can achieve but no. of sheets are increasing and loading time will increase.
is there any other method?
hi srivastava,
i cant get ur code can u share me the example.
This might help you Veera dynamic sort order for expressions