Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3276

Use different combination of dimension without duplicating same data source in design studio 1.6

$
0
0

This is going to be my first contribution to the forum. I am very much nervous. I have been working with design studio for nearly two months and I am very much new in this BIAL.

 

So admins please do not block me from asking question.

 

Before starting anything I just want to say thanks to Nithyanandam Venu's Profile | SCN for inspiring me to think.

 

Scenario -

 

I just wanted to get rid of this following problem bellow picture is showing.

 

ds.png

 

Every time to feed my charts I had to duplicate same data source again and again and create different initial views. Then I did some r&d and came to know about the setDataSelection function. It solved my problem but brought a new one and that was, the syntax of the method.

 

DS_1.moveDimensionToRows("Customer",0); 
CHART_1.setDataSource(DS_1); 
CHART_1.setDataSelection({   "Customer": ["0000000002", "0000000001", "0000000003" , "0000000011"]}); 

It was very much clear from the above coding that, programmer must the know the members of the Customer dimension. Okay if somehow we can manage the members also we just can not add manually all of them hard coded. It is ridiculous thing to do. Above all the main problem arise when we add any filter like region or country of state before getting  the Customer members. Because every time the the members get changed based on the filter value.

 

Solution --

 

So here is my solution for this. I have written a global function as follows......

 

fun.png

 

and this is how I call the function.

 

CHART_1.setDataSelection(GLOBAL_SCRIPTS_1.getMultipleCombination(DS_2, "Month"));

We can replace the "Month" dimension with whatever dimension we want.

 

It is my humble request to all the design studio expert to review my approach and let me know how can we make it better.

 

I appreciate any comments.


Viewing all articles
Browse latest Browse all 3276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>