cancel
Showing results for 
Search instead for 
Did you mean: 

Can I getmemberlist that sorted like datasource in design studio

former_member241445
Participant
0 Kudos

Hello, everyone.

Have you faced this qustion?

I've sorted a mearsure by Des,and the demission also set "only values with posted data".Like picture one.

but when I use DS_2.getMembers("VKBUR", 10) ,I can get 10 members,but those values wasn't I wanted.All of them was not I wanted that sorted in datasource.Like picture two.

My version is 16.4.0,datasource is OLAP.

Waiting for your help!

Thanks.

Jing

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Jing,

If you can't set bottom 10 condition on your data source (sorry, I'm no HANA expert, so can't help with that) then you may need to resort to writing some JavaScript to sort your members in the correct order. Please have a look at this thread which shows code for sorting top 5 members. You will need to tweak it for you 10 bottom example:

https://archive.sap.com/discussions/thread/3699715

kohesco
Active Contributor
0 Kudos

Hi,

looks like a condition -> bottom 10 -> try to apply such a condition and then do get.members

Grtz

Koen

former_member241445
Participant
0 Kudos

Hi,Koen.

Can you make it clear? I tried sort mearsure in sap design studio,also tried sort in HANA,but still false.

Thanks .

Jing

kohesco
Active Contributor
0 Kudos

Hi,

Eclipse -> BEx Query Designer -> Condition

Grtz

Koen

former_member241445
Participant
0 Kudos

Hey.Koen.

What a pity! We are used HANA,not BEx Query.So,the solution of you advanced can realize what I want.

Do you have other solution in HANA universe or OLAP?

Thanks.

Jing

kohesco
Active Contributor
0 Kudos

Hi,

I can only advise to implement a BI layer for reporting

Grtz

Koen

Vidhya
Active Participant
0 Kudos
Vidhya
Active Participant
0 Kudos

For more options, we have sorting option in Edit initial view, Data Source level and in Query Panel.

After sorting the dimension then you use the below code to filter your Top N / Bottom N data and then apply that Data source to your Column Chart.

var P= DS_1.getMembers("dimension", 10); 
DS_1.setFilter("dimension",P);
Former Member
0 Kudos

Unfortunately, this doesn't work for me. I also get a random set of members, despite the fact that I use sort(sortByMeasure) on data source before I getMembers() and setFilter().

I get exactly the same result when using getMembers() to filter my query whether or not I use sorting.

Vidhya
Active Participant
0 Kudos

Based on your requirement you can use sorting option. I had a scenario, so i used dimension sorting and it works for me.

former_member241445
Participant
0 Kudos

Dear Vidhya.

Thanks for your replay.I was thought as you,but it still false.In my thought,if I set sortByMeasure,and I get the members,the value should be sorted value. It's seens like getmenbers data not from datasource as we see.

Thanks.

Jing

Former Member
0 Kudos

I have sorted my data source by dimension, but getMembers() still brings up the same set of values, which are random.

Can you please show a screenshot of your example, perhaps I am missing something?