cancel
Showing results for 
Search instead for 
Did you mean: 

What if Analysis

Former Member
0 Kudos

Hi,

By default its not possible to create what if dashboard so I have installed, SCN Community addon for Design Studio, and i am trying to create a what if analysis dashboard.

I saw one component slider where there is option of on live changes under events. Can i create a what if dashboard using this?

Any examples?

My test case is:

I have number of employees against each department. So if i have 5 department, I will have 5 slider and on increasing one slider, number of employees will increase and overall of count will also change. Is this possible?

Regards

Nishant

Accepted Solutions (1)

Accepted Solutions (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Nishant,

I assume you are referring to this SCN Community Slider Component.  In theory, yes, in the liveChange event you could perform the necessary calculations via scripting (and access the data source result set values if needed).  However, the challenge is then displaying the calculated results with a suitable component.  You will not be able to display such calculated values with the standard charts or crosstab because it is not possible to introduce calculated measures (yet).  However, if you simply want to display the what-if calculated values and total in text components then this would be achievable.

If you could elaborate a little more about how you would like to display the what-if results then we can provide further guidance accordingly.

Regards,

Mustafa.

Former Member
0 Kudos

Hi Mustafa,

Thanks for the reply.

Yes i am referring to SCN Community Slider Component.

Requirement is to show any increase in departmental employee count in the form of a speedometer.

Suppose total target of a company to increase number of employee is 12 people, so based on departmental employee increase they want to see the value increase. Only the speedometer values will change based on slider not the initial table or chart where departmental values are there.

Regards

Nishant

MustafaBensan
Active Contributor
0 Kudos

Hi Nishant,

Thanks for the clarification.  The SCN Community components include a gauge/speedometer with a script function to update the value, so you should be able to implement your requirement as I have described.  Here's a link to the component:


Gauge (Speedometer) - SCN Design Studio Community


I'll see if I can put together a working example when I get back to my desk.

Regards,

Mustafa.

Former Member
0 Kudos

Hi Mustafa

Sure Thanks

Please let me know.

Regards

Nishant

MustafaBensan
Active Contributor
0 Kudos

Hi Nishant,

Here's an example of how you can link sliders to gauges:

Each range slider "On Change" script code looks like this:

dept1EmployeeIncrease = me.getValueAsInt();

GAUGE_1.setShowedValue(dept1EmployeeIncrease + "");

GAUGE_1.setIndicatorValue(dept1EmployeeIncrease);

additionalEmployees = dept1EmployeeIncrease + dept2EmployeeIncrease + dept3EmployeeIncrease;

TEXT_2.setText(additionalEmployees + "");

Global variables are used to keep track of the incremental employee count.  Note that I have used the "On Change" event instead of "On Live Change" since the binding of the latter was out of synch. 

If you'd like to set the starting values of the speedometers to the corresponding actual headcount values from the result set then you can obtain these values by iterating through the data source members using getData() method.

You will notice that speedometers take up quite a lot of space on the dashboard, and for this reason their use is not recommended as a best practice.  I suggest that you consider using bullet charts as a more compact alternative.

Regards,

Mustafa.

Answers (1)

Answers (1)

Former Member
0 Kudos

I'm trying to build something similar but need the text box value to be changed in real time (while the slider is still being moved left and right).  I can not seem to figure out how to use the On Live Change event.  This function is not being called at all.  Any help is appreciated!

Thanks,
Vish

mike_howles4
Active Contributor
0 Kudos

You wouldn't want to use UI5 onLiveChange events.  Every property change and event that is fired goes through the Design Studio runtime/server layer to track state and it will crash the runtime if you issue too many too quickly.

Former Member
0 Kudos

Hi Mike, the functionality I am looking for is this...

I have a slider and a text box on my dashboard.

When a user slides the slider I would like the current slider value to be displayed in the text box.

I am able to achieve the above by using the OnChange event of the slider.

However, I would like the text box to be updated in real-time as the user is sliding the slider left and right (prior to the user letting go of the mouse).

I hope I was able to explain it properly.

Thanks!

MustafaBensan
Active Contributor
0 Kudos

Hi Vishrut,

In theory you should be able to do this by setting the Activate Live Change Event property to true,  which is what I tried for my original example above but found that this event didn't seem to fire properly, resulting in sporadic updates.  This could be due to the issue Mike has mentioned above.  Also note that the Activate Live Change Event is marked as "prototype" so it may not be fully functional yet.

In case you want to try it out for yourself, here are the settings, script and result:

I can understand why you would like to implement the above scenario with realtime update because this is a common scenario that is supported in Dashboards (Xcelsius) but it doesn't seem to be as straightforward with Design Studio.

If you really want the onLiveChange event of the fixed (assuming it's even possible given the issue Mike has pointed out), you could raise this in the SCN Community Issue Log: Issues · org-scn-design-studio-community/sdkpackage · GitHub

Regards,

Mustafa.

Former Member
0 Kudos

Thanks Mustaf for the update. I tried the steps you mentioned but the On Live Change script does not seem to be called (I also tried putting Alert statement). The only difference is that I am using 2.0 version of the component while I saw in your screenshot it seems uiu are using version 1. But anyhow as you mentioned this is a prototype version and may not work properly I will pass this feature for now since I have already spent a lot of time after trying to get this working. If I still need this functionality I may end up writing my own slider component using the SDK.

Thanks again!

Vish