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

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!

Here is an example - note in this example the data cube doesn’t contain any measures on purpose so you can see that the product dimension was dragged onto the data analysis panel measures (also note that in this case the aggregation is using a distinct count so even though I had 7 records for 2016 the count for that year is only 5):

Thank you, thank you, thank you for this tip (Tip #10 on getting count or distinct count for a hierarchy by dragging it onto the measures area of the data analysis panel)!

We have been trying to figure out how to do this for a few weeks now. Even when we contacted the Dundas BI help team the advice they gave us was different. This is such an easy solution.

One thing to note, you cannot drag a hierarchy from the row or slicer section to the measures section but you can drag it directly from the explorer section on the right to the measure section of the data analysis panel.

Have a great day everyone and happy visualizing!

Tom

3 Likes

Jordan et al,

Looking into this 3 year old tip. Does anyone know of a way to expose these “quick stats” in a dashboard? I’d love to have a field/vis/html component that reacted to highlighting cells in a table/vis.

Hey Devon,

Check out the reply found here Tip 10. It shows how we can take advantage of filters to dynamically show the Distinct Count/Count for a hierarchy.

Thanks,
Mark

Hi Jordan,

Is there a way to set the default of any property of any table to show ‘No Totals’ ? I rarely ever use totals and spend a lot of time just removing the totals from my tables.

2 Likes

@liam.skop - i don’t believe there is a way today so I went ahead and created a feature request for you. ref87431)

I also find myself disabling totals as the first step in every data table. It could be done via script but keeping a script and pasting it in seems like it would take longer than just changing the property. The ability to default this would be nice.

4 Likes

Thanks Jeff, much appreciated!

1 Like

@jeff and @liam.skop
Me too would absolutely love that feature! Great to see it added as a feature request

3 Likes