Skip to Content
0
Former Member
Apr 08, 2016 at 10:56 AM

Dimension Values based on Result Rows/Cells Value

28 Views

My requirement is to display Manager Name based on there Employee Rank. Rank is a formula defined in BEx Query based on on Sales of Employee. Also Count of Employees > Count of Managers.

In other words with example...Below image is from Edit Initial View.

If Rank in Result Row is 3 then display "A" in Textbox Component.

If Rank in Result Row is 21 then display "B" in Textbox Component.

If Rank in Result Row is 20 then display "C" in Textbox Component.

If Rank in Result Row is 8 then display "D" in Textbox Component.

Trying with code like below but no luck.....

var MANGERS = DS_1.getMembers(Z_Manager, 100);

var Rank='';

MANGERS.forEach(function(element, index) {

Rank = DS_1.getDataAsString("RANK",{"Z_Manager":element.internalKey});

if (Rank == '1') {A2.setText('(*'+element.text+')');}

else if (Rank == '2') {A2.setText('(*'+element.text+')');}

else if (Rank == '3') {A3.setText('(*'+element.text+')');}

else if (Rank == '4') {A4.setText('(*'+element.text+')');}

else if (Rank == '5') {A5.setText('(*'+element.text+')');}

else if (Rank == '6') {A6.setText('(*'+element.text+')');}

else if (Rank == '7') {A7.setText('(*'+element.text+')');}

else if (Rank == '8') {A8.setText('(*'+element.text+')');}

else if (Rank == '9') {A9.setText('(*'+element.text+')');}

else if (Rank == '10') {A10.setText('(*'+element.text+')');}

});

Your help on this is highly appreciated.

Attachments

Scenario.png (14.8 kB)