Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to do custom sort in a report?
% | No Of Emps |
>30% | 12 |
10%-20% | 45 |
20%-30% | 60 |
0%-10% | 14 |
Thanks in advance
Hi,
If you are using this in multiple charts, then in every chart you need to hard code this expression, instead of this try like this
SomeTableName:
LOAD
*
INLINE [
%
>30%
10%-20%
20%-30%
0%-10% ];
Note : The script should be kept at the beginning of the script.
Now in chart properties -> Sort-> Select Dimension -> Select Load Order -> Original
Hope this helps you.
Regards,
Jagan.
I am guessing that the % field is a calculated dimension. You should be able to sort it using a sort expression like this:
Match(YourCalculatedDimension, '>30%', '10%-20%', '20%-30%', '0%-10%')
You will just need to make sure that values within the single quotes ('>30%') match exactly, even the spaces, with how your dimension outputs.
Best,
Sunny
Hi sunindia ,
Thank you.
I was working on a sample for you. I guess its no more needed, but I am still going to attach since I have already worked on it
Best,
Sunny
Hi sunindia ,
Thank you for your attached file. Actually I have done everything on script level but you have shown me front end.Now it is perfect.
Many thanks dude.
Hi,
If you are using this in multiple charts, then in every chart you need to hard code this expression, instead of this try like this
SomeTableName:
LOAD
*
INLINE [
%
>30%
10%-20%
20%-30%
0%-10% ];
Note : The script should be kept at the beginning of the script.
Now in chart properties -> Sort-> Select Dimension -> Select Load Order -> Original
Hope this helps you.
Regards,
Jagan.
Hi jagan
Thank you .
jaganI agree with you that doing it in the script would be quite useful, but I don't think that you will necessarily have to retype the same expression over and over again for different charts, you can always create a variable and use that over and over again.
vSort = Match(YourCalculatedDimension, '>30%', '10%-20%', '20%-30%', '0%-10%')
Best,
Sunny
Hi,
When chart loading with Load Order then the performance would be better when compared to the expression. Your expression in variable also works but this is the best solution.
Regards,
Jagan.
This seems like a valid argument. I think I will have to test this out because I didn't think that load order would be faster than expression, but it does make sense.
Thanks jagan mohan
Best,
Sunny