How can I automatically use values from a higher-lever(master) visualization when creating a lower-level visualization (details) in Spotfire? - spotfire

I have several different store regions in a single table. Let's call them A, B, and C.
Right now, the master visualization shows the regions. When I drill down into a specific region, I can see all of the states within that region. The table that shows the states shows the unit percentage as out of 100%, but I want it to be out of the region's unit percentage.
Below is the region view and the current result I am gettting for the states view.
Current Result
I want to get the states view to look like this:
Desired Result
So esssentially, I want the units in a details visualization to automatically divide by the grand total of units in a master visualization in order to get a wholistic Unit % column.

Your details visualization will only contain data from the selection of your master visualization, therefore any calculations in your details visualization can only be based on this data.
However, you could store the value of all units, for all regions, into a property control Sum([Units])and reference it in your details visualization like Sum([Units]) / ${propControl} where here the units would only be for the selected region.

Related

Add a Table counting values in a Line graph

I have a line graph displaying a percentage of assignments completed on time vs a target percentage and I'd like to have a table below showing which group has had overdue tasks as time goes on.
So what I did was add the Data Table element and included the groups performance as multiple data series (same as Target% and Actual%) but this only shows 0s rather than the values of the cell while also treating it as more inputs for the line graph.
Is there a way to do what I want?

Excel Pivot Table - Percentage of a column

I'm supposed to create a report with all the information I have collected about employees from certain departments. Im collecting their location, work mobile, work pattern and leave entitlement.
I have to also show the percentages of everything I have collected per object ( example: 76,22% Base locations collected from business services department.
This is currently what I have done:
The column highlighted in yellow is supposed to display for business services (109/143) * 100 = 76,22% so the percentage of base locations I have collected out of the number of reports. Is there any way I can do this?
That's the calculated fields option in 'pivot chart' > Options
How to on support.office
Then, it's just in the calculation field: one column divided by the other.

Creating independent variable Stata in Panel Data model

Data and description of variables
Picture 1 and Sample unbalanced paneldata
Picture 1 shows a balanced panel data that I have created using an unbalanced one provided as a sample in the same image, where I had multiple products (ID) for different amount of years (YEAR). For each product, there were a different number of Shops offering the given product (ID). So as stated, this is a balanced set created by sorting out for the same years, same products (ID), and same shops (marked by the orange area in the sample unbalanced paneldata). This is an important assumption that might affect the perception of the issue stated below. The following is therefore a description of the table shown in Picture 1:
Years indicates the amount of period a product lasts for a given product (ID)
Shop 1, Shop 2, Shop 3 indicate different prices for a given product (ID) by different firms
The minimum and second minimum value depict what shops for a given year and product (ID), have the lowest and second lowest price for that given year. This is needed to calculate the Price difference, which is **(Second minimum value - Minimum Value) / (Minimum Value)
An example of this, is given for row 5 (Year 01.01.1995 - ID 101) where Price difference would be (3999-3790)/3790 = 5,51% (In Picture 1)
Issue
In my balanced panel data, (Picture 1), I want to run a fixed effect regression in STATA using xtreg function, where the dependent variable is the Price difference, and number of shops selling a product are the independent variables. This is, so I can say how Price difference as a dependent variable is affected when there is 1 shop selling, when there are two shops selling, and when there are three shops selling.
Another problem is, is my assumption valid at all of creating a balanced panel? Is it correct to create a balanced from the unbalanced paneldata, or must I use the unbalanced panel to create such a variable?
So my main issue is how to create such independent variables, that measure the dimension of number of shops offering products. To
clarify what I mean, I have included an example of a sample fixed
effect regression that may explain the structure that I attempt to
seek, in Picture 2 below:
NOTE (In picture 2 expected cell mean to the right is the same as Price difference in Picture 1, and is used as dependent variable. They are regressed on number of firms/shops as independent variables, and these I have an issue creating)
Picture 2
What I have tried
I have tried, using dummy variables, on shops, but they ended up getting dropped. The dataset provided in picture 1 is a balanced data set as mentioned, which is needed to run (I assume) a fixed effect regression on a paneldata.
End remark
I stated this question earlier in a much more imprecise manner, where I apologiese for any inconvenience. The problem I think, might be that either I have set it up wrong in excel, hence the dummy's are dropped, or something of that nature. It might also be, that I have to use the unbalanced set in order to create this independent variable, so that might also be a problem, that I am attempting to use a balanced set instead of the unbalanced one.
In your unbalanced sample (as we discussed in the comments, the balanced sample will not make sense) we first need to create a variable for the number of shops offering each ID, let us say we have the same data as in the top portion of your Picture 1
egen number_of_firms = rownonmiss(Shop*)
xtset ID year // to use xtreg, we must tell Stata the data are panel
xtreg Price_difference i.number_of_firms
The xtreg is the regression shown in your Picture 2.
If you want the number of firms variable to be formatted a bit more like Picture 2, you can do something like this:
qui levelsof number_of_firms, local(num)
foreach n in `num' {
local lab_def `lab_def' `n' "`n' Firms"
}
label def num_firms `lab_def'
label values number_of_firms num_firms
label var number_of_firms "Number of Firms"
And then run the regression and the output will be formatted with the number of firms lables.

Passing parameter to the drill thru report in cognos

How to Pass a Calculated Member/measure to a Drill-thru Target Report
In order to avoid using Calculated Members--because from googling some people were saying you could not pass them via Drill-thru--I went back to my FM model and created 3 new measures (High Risk, Low Risk and Medium Risk). Now these will show up in the drill-thru definitions parameter list . . . my only problem is that how can I do a check to see which of the three measures has been selected by a user?
Remember, I basically have a line chart with 3 lines, one for each measure above (High, Medium or Low Risk) by time frame. A user will select a data point, High risk for March or Medium Risk for Semester 2, for example. I then need to pass the value for that datapoint to my Target (2nd) report. How can I check for which of the three measure values they passed through?!?

Grouping data in chap-links-library

I am using chap-links-library in the project I am working on. We are trying to show different kind of activities that a user performed. We want to display the activities and number of times that has been performed by the user.
The initial zoom will be for 12 months and the user can zoom in to day level. I want to group all activities of same type performed in a month and show the cumulative count on initial display. When user zooms in they should be able to see the split up of activities and its count based on the visible range.
Any pointers on how to handle this in chap-links-library will be useful.
You can listen for the rangechange or rangechanged events (see docs), and when the visible range exceeds a certain threshold, replace all data in the Timeline with more coarse grained data when above it, or with the detailed data when below the threshold.
You may want to have a look at the successor of chap-links-library, vis.js. You can find an overview of the main changes here: http://almende.github.io/chap-links-library/#successor.

Resources