Hi,
Is there a way to implement custom value sort on a measure ?
Taking the attached screenshot as an example, I have a xampivotgrid with 2 row fields (no column fields) and a measure. When i sort on measure, i want the sort to happen on the total for the first row field.
i.e Sort should be on the total of measures for A/D/F/G etc... Currently its only picking the first value for the second row field (143/144 etc).
Hope its clear. I can provide more details if required. Basically i need a way to implement custom measure sort.
Thanks
Amit Kamat
Hello Amit,
Thank you for your post. I have been looking into it and I can suggest you see this link from our online documentation:
http://help.infragistics.com/Help/Doc/WPFDV/2011.2/CLR4.0/html/xamPivotGrid_DV_Sorting_Rows_and_Columns.html
where it is explained how to implement a custom sort logic. Please let me know if you have further questions on this matter.
Looking forward for your reply.
Hi Stefan,
I have seen this document and i dont think this is what i need.
The documentation specifies custom sort for Hierarchies/Dimensions and not measures.
How can i sort a measure based on a custom logic ?
Considering the provided screenshot it seems you have placed two completely flat hierarchies in the rows. FlatDataSource does not provide totals over different hierarchies. You have to create a complex hierarchy instead. The first level members there will be A/D/F/G and the second level members will be the numbers 143/142/... Also there will be created total rows for A/D/F/G members, which the sorting will be aware about.
Regards,Plamen
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Thanks for the solution. I will get back to you if i need further assistance.
Regards,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Currently there is no build-in functionality for creating hierarchies via the UI of the XamPivotGrid. The thing you can do is creating a custom UI, which you can use to create the hierarchies with code. Please let us know if you have further questions on this matter.
Thanks Plamen! That worked.
Just one more question...is it possible to create a complex hierarchy from the front end (without doing an add level in code/xaml)?