COGNOS: Calculation in a cross table based on condition from other dimension - reporting

.
Hello all,
does anyone now if there is a function to calculate a measure based on 'Assets' with the condition of "Profit Center Contribution" or "Funding Center Contribution". (see image below)
Thanks in advance

If you are using a DMR model you could use the tuple function. Assets -FCC= tuple(Profit Center Contribution, assets, currentmeasure)

I know you already found a solution,
drag your Data item to the end of "Assets" and make it nested.
Some think like this,
if you want exact "Assests-FCC" then create additional QueryCalculation1 = Col1+'-'+Col2.
And add QueryCalculation1 to left of Crosstab.

Related

SonarQube create a dynamical dashboard

I want to know if somebody know if it possible to create a dynamical dashboard. By dynamical, I want to say, a dashboard that displays the different widgets depending on the results that have changed from the previous execution .
For example, if the lines of source code comments have greatly diminished , it result appears first in the dashboard. The user can see the detail in first.
Thank you If you know help because I don't find an issue at it problem.
Thank you
No, widgets are not positioned dynamically.

limiting the number of images you can upload

UPDATED QUESTION
OK new idea.
.on('deleteComplete', function(event, id, fileName, responseJSON) {
}
how can I call the sessionRequestComplete function. I think this might "refresh" the array and solve this issue.
Matt
I am trying to limit the number of images a person can upload.
I also need to include the ability to have the orginal file plus two scaled images.
When I tired to use the
validation: {
itemLimit:6
}
option I needed to triple the number of items since I was have the system upload three images.
I got this all to work but the issue I am having is if I delete an image and then add a new image and to this a couple of times, the system will then alert me that I have exceeded the itemlimit.
is there a way to "refresh" the items in the current session of the uploader in the deleteComplete function.
thanks.
Matt
The itemLimit validation rule is quite literal. You'll need to keep this in mind when you determine a proper number. if you are using it with scaled image generation turned on.
If you are looking to adjust this value dynamically, or expect it to work differently, please open up a feature request.

Need clarifications on adding regions dynamically in Marionette

I have an application where I need to display metrics. The application needs to display a separate vertical section for each metric. When I started this, there were only 5 metrics so I naively created a template with 5 regions, one for each metric I needed to display. Now, new metrics need to be added and I want to avoid adding "hardcoded" region divs in the template. I want to refactor this and create the required regions dynamically at startup time based on some configuration data.
So I have been looking at the latest Marionette release and in question "Dynamically add regions to Marionette layout", Derick Bailey mentions that Marionette v1.0 supports dynamic regions in Layouts through addRegion(), as in:
var layout = new MyLayout();
layout.render()
layout.addRegion("someRegion", "#some-element");
layout.someRegion.show(new MyView());
I have tried that in my code (using Marionette 1.0.2) and I am not getting it to work. I don't have a div with id="some-element" in my template and I suspect this could be the reason. I was hoping that Marionette would create that div itself.
Perhaps my expectation of what dynamically adding a region means is wrong. So my first question is: when adding regions dynamically to a layout, must the element id passed in the addRegion() function already exist in the layout?
If so, then I am back to the problem of having to "burn" in the template those divs for the regions to attach themselves too. My follow-up question is then: What is the best way of doing this in a data-driven fashion? Is it a matter of writing my own render() function so that the right set of divs get created? Or perhaps providing my Layout with a model object that will contain data which the template can then iterate through to create the necessary divs? How do we add regions dynamically to a Layout object if we don't know in advance how many regions we will actually need?
Aa #aaronfay specified, we need to use jQuery to create the element on the page. Here is some sample code:
var layout = new MyLayout();
layout.render()
var regionName = "dynamicRegion";
layout.$el.append('<div id="'+regionName+'"></div>');
layout.addRegion("someRegion", "#"+regionName);
layout.someRegion.show(new MyView());
I believe you would need to use jQuery (or similar) to create the element on the page. A Region expects the element to exist.
Otherwise, I believe your answer is here.

Adding an element to top of a group element

After joning data with my group I would like the elements in the enter selection to be added to a group (g-element) on top/highest up. Default is to append to the bottom.
The reason for this is that I want the object to visually appear below the all ready visible objects.
I know I can order and sort but I thought there might be an easier/better way to do this. I have done several manual things only to later find out "Oooh, they included a smart way to do that, EASILY."
D3 does have an insert method: https://github.com/mbostock/d3/wiki/Selections#wiki-insert
Excerpt from Reference
For instance, insert("div", ":first-child") will prepend child div
nodes to the current selection.
https://github.com/mbostock/d3/wiki/Selections#wiki-insert

WP7 Changing 1 layout element based on another

Having no luck here trying to find a solution to this.
I've set up a looping selector based on this guide. (I also used the ListLoopingDataSource class in Part 2 in order to have strings in my looping list).
What I want to be able to do is then change another element (an image box/placeholder) on my layout, based on what is currently selected in the looping selector.
No real idea how to do this, the onSelectionChanged event is kind of abstracted and not really useful? I'm not sure how to programmatically change images either, it doesn't look like I can access a resource from the code base, only from the xaml.
Any help/suggestions would be greatly appreciated.
I found that I could do this by using binding.

Resources