Skip to Content
0

Can I getmemberlist that sorted like datasource in design studio

Mar 28, 2017 at 09:25 AM

256

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Vidhya V Mar 28, 2017 at 10:12 AM
0
Show 5 Share
10 |10000 characters needed characters left characters exceeded

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);
dssort.png (11.4 kB)
0
Former Member
Vidhya V

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

0
Former Member

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.

0

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

0
Former Member
Vidhya V

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?

0
Koen Hesters Mar 28, 2017 at 11:08 AM
0

Hi,

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

Grtz

Koen

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

Hi,

Eclipse -> BEx Query Designer -> Condition

Grtz

Koen

0
Former Member
Koen Hesters

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

0

Hi,

I can only advise to implement a BI layer for reporting

Grtz

Koen

0
avatar image
Former Member Mar 29, 2017 at 09:29 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded