[Tip 1 - 39] Dundas BI Tips & Tricks!

Used this in a line chart legend and worked perfectly however it has its limitations in other chart types

Used this in several dashboard

Great forum and smart ideas. ..

Tip 39 - View the Queries Sent to your Database


Starting with Dundas BI 4, you can now change your log filter settings to see the queries sent back to your database. This can be very helpful in case you want to troubleshoot a specific scenario using the query created by the system. You can learn more about this feature:


HERE

use this tip all the time!

Hello Jordan, is the code or the dashboard available for the second option, I prefer the interactions of that one and would like to apply it to my dashboards.

Hey Doug,


If you’re interested in applying those interactions to your dashboard, you don’t actually need code for it. If you follow the steps above in the 3rd paragraph, and use an image, rather than a button, you should be able to accomplish this.


A more detailed example of how this can be done, can be found here: http://www.dundas.com/support/learning/documentation/design-view/interactions/use-a-button-to-apply-a-filter-value

Hello Jordan,

I have looked at that, and it does not have the iteractivity between multiple buttons. In the second example when you click the first button it becomes highlighted as selected (something I cannot seem to get the new filter buttons to do). But more importantly, when you click a different button, not only does the filter change but the state of the first button becomes unselected, in otherwords they are responsive to each other. Additionally, I am hoping the code will help me learn to make a button two-state, so that when I click on it once it is selected, when I click on it again, it is not selected. two actions for click dependent on current state. I hope this makes sense.

Hey Doug,

You are right, the interaction itself will not highlight the button or the image. What you are looking for is a styling code, which can be written in countless ways. Basically, you apply one style to the control that was just clicked, and another to all the other controls.


In this specific sample, we used updateOpacity and set it to true for the clicked group of controls. For example, the Asia group has this script on the click action:


hospitality.updateOpacity("AsiaGroup", true);
hospitality.updateOpacity("NorthAmericaGroup");
hospitality.updateOpacity("EuropeGroup");
hospitality.updateOpacity("OtherGroup");

I am prompted for an ID and password, what should I be using there?

Also, I am not sure how this is implemented. I currently have a formula like this:
if ($FRUITS$ == "Apple"){return $COSTS$} else {return 0}
I would like to make the value 'Apple' a variable. How would I create a placeholder to represent that value?

The provided link has been updated, it no longer requires an ID or password.


Doug, as Jordan indicated, you create a formula specifically for your variable, $Apple$. With that in place, you can connect a filter to it, or just a view parameter, and use a script to change the values. In the sample Jordan provided, Yearly Contribution is a variable, which you change with a script:


//pick up the selected value
var selection = slider3.valueFirst;

//label1.labelText = selection;

//get the parameter to setup
var viewParameter = dundas.context.baseViewService.currentView.control.viewParameters.toEnumerable().first(function(vp) {
return vp.name === "viewParameter1"
});

//setup the parameter value and ensure the token like "all" is null
viewParameter.parameterValue.value = selection;
viewParameter.parameterValue.token = null;

//refresh all the controls bind to this parameter with the new parameter value
viewParameter.refreshAllAdapters();

Hello Elia,

Thanks for the code. I am hung up though on the first step!

'create a formula specifically for your variable'

How do I set up a formula to be an array of string items? i.e. "Apples", "Bananas", "Oranges", or even to be just a text format type? As far as I can see formula output can only be numbers. I feel like I am missing something very basic about placeholders. Thanks for the help

1 Like

It's easy to miss this part, I was actually in the process of adding it to the documentation when you posted the question.

With your formula bar open, click on the parameter placeholder you created (the formula has to be applied already), this will open the Placeholder dialog. Click Parameter placeholder properties and you can change the Parameter Type there.

ok, still struggling. First I created a formula based measure (named: varble) with the following formula: "" That is correct two double quotes to designate an empty string. I then created another formula measure that uses that formula measure for the placeholder. It's formula is this: if ($MASTER_BRAND_KEY$ == $varble$) {return $WEIGHTED_ATTRIBUTE$} else {return 0}. When I click on the $varble$, it does not open the Placeholder dialog. I do not see Parameter placeholder properties. I am obviously missing a step here somewhere.

I would rather say that you made one step too many. The first formula measure you created doesn't declare a parameter placeholder. It is essentially a constant with double quotes in it and the second formula measure calls this already existing constant. If you instead directly create the second formula measure (when the varble measure doesn't exist), $varble$ is treated as a parameter placeholder and you can click on it.


However, while playing around with this I found an issue that would prevent you from acheiving the behavior you are looking for. This has already been fixed and will be included in the coming minor release.

Thanks for the update, I tried it the other way, but still did not see a placeholder dialog. Any target date for the next minor release?

Did you perhaps try right after deleting the first formula measure? in that case you would have to check in and check out the dashboard so it stops treating it as an existing parameter.


We don't have a target day just yet. I added you to the submitter list for the issue though, so you will be notified when it's released.

Great! thanks Elia

Can you please attach a screenshot?
Thanks!