Spotfire - Marking with a Y-Axis Custom expression - spotfire

Currently, I'm trying to create a combination chart (graph) in Spotfire where a specific record could be bucketed into one or more categories. For example, I have a category for newly created invoices as well as a category for invoices that are in process. Easily, you can have an invoice that is both newly created and in process, and I want to show these both these categories as separate series so that I can monitor each category independently (i.e. if I have a population of 600 invoices of which 500 are newly created and 300 are in process, I want to be able to drill down into the 500 newly created invoices or the 300 in process ones, regardless of overlap)
Currently, I can create the graph by using a CASE statement for the Y-Axis (i.e. if it's a "New Invoice" Then 1, ELSE 0) so I can get the graph to show the correct number of records. However, with this method, Spotfire doesn't know that only records that satisfy the case statement should be marked; therefore, if I try to mark these specific transactions, I get detail for all transactions.
Has anyone figured out a way to get around this? Obviously, if each criteria was independent, the marking could be done really easily, but since it isn't, I can't seem to crack what seems like a very simple problem.

I would suggest creating a calculated column that splits your data set accordingly. For example, use an if statement or case statements to have your calculated column return "New Invoice", "In-progress Invoice", or "New and In-progress Invoice" based on your specific evaluation criteria for determining which bin each invoice falls in to. Then you could series the graph by that new column and it should work when you mark the specific invoices.

See if creating a hierarchy like [OLD or NEW], and place [STATUS] (which may be Open, or In Progress, or Closed) below the [OLD or NEW] column. Place this hierarchy in X axis.
You would see like OLD which can be further translated to either Open, In Progress, or Closed, and the same with New.

Related

How to keep the Cognos List structure?

I have this list with some Grouped columns and with some non grouped columns as well as some List Header and Footer.
I also have some automatic created TOTALS for some of the metrics as well as some manually created totals for some metrics.
QUESTION : I now simply need to REPLACE a metric on the report by another metric. Problem is that the list displays automatic totals for some of the metrics including the one i need to replace so i want to know if it will break (destroy) the structure of my list and will i need to recreate its structure or is there a way to replace the metric without affecting my list sttucture, therefore no need to recreate my totals
Regards !
I believe you can go to the query for the list
In the query, find the data item
Change the expression definition to the new thing you want
Change the property for the name & label too
This way you do not have to adjust the layout

SSAS Calculated member that knows if the user is using the report filter

I am trying to write a calculated member which acts differently depending on whether the user is filtering by that member or has it dragged down as rows or columns on their pivot table (using Excel).
The rules are:
1. If the user is using the date dimensin as a Report Filter in Excel, then the calculated member should get the maximum date out of all dates that they are filtered by.
2. If they have the date dimension as rows on the pivot table, then I need to apply ClosingPeriod and some other logic.
Please try this. The idea came from here.
Basically the dynamic named set represents what's in the report filters. And the EXISTING keyword trims the list of days down to the filter context of the current cell letting you detect say if one month is on rows. Compare counts and you can detect what the user did.
CREATE HIDDEN DYNAMIC SET CURRENTCUBE.SelectedDays as
[Date].[Date].[Date].Members;
CREATE MEMBER CURRENTCUBE.[Measures].[My Calc] as
CASE
WHEN SelectedDays.Count > {existing [Date].[Date].[Date].Members}.Count
THEN Tail({existing [Date].[Date].[Date].Members},1).Item(0).Item(0).Name
WHEN SelectedDays.Count < [Date].[Date].[Date].Members.Count
THEN Tail(SelectedDays,1).Item(0).Item(0).Name
END
Performance is going to not be good. And I suspect users will be confused with the results of your calc. If you want to describe the business scenario more I can maybe recommend a better approach.

SSRS Separate Table for each grouping

I have a simple SSRS report which has one group and details. The grouping is by employee and the details are performance data on each. After tedious calculation, it just comes down to
select * from table
and I have SSRS do the grouping on the employee column. There are several tasks for each employee, so that is why the grouping in the first place.
My problem is, the user would like to be able to distribute these stats to the employees, and it would be easier if there were some white space between these groups (between each employee).
I've tried adding a blank row inside or outside the group, but I can't find a way to do that so it won't put a row between each task. I tried using a list, but in the end, got the same problem--the group still forced it to behave that way.
I know I can insert a page break between groups, but that would be a huge waste of paper, having each employee on a separate sheet.
Is there a way to essentially have each employee (group), be in a separate "table"--such that I would have maybe a half dozen on a sheet that could easily be guillotined?
EDIT: Here's a screenshot of it as it is now:
Table
I don't know how I could use a rectangle because the results (groups) are all in the same table. The idea would be to insert a space between each group (person).

How do I create report-like data tables in Excel?

In the past I have created websites that extract data from a database and format it using tables.
Now, I am trying to do the same thing but with Excel, and I'm lost. I am used to using SQL commands to extract data from given fields and then sort/manipulate it.
Currently, I am able to print a report that provides me with an Excel spreadsheet full of raw data, but I would like to make my life easier and organize it into a report.
The column that I would like to reference contains duplicates, but the data in the adjacent columns is different.
To give an example, assume I had a spreadsheet of sales transactions. One column would be the Customer ID, and the adjacent columns would contain the quantity, the cost per unit, total cost, order ID, etc.
What I would want to do in this case would be to select all the transactions with the same Customer ID and add them together based on their Order ID. Then, I would want to print the result to a second sheet.
I realize that I can use built-in functions to accomplish this, but I would also like to format this report evenually using VBA. Also, since I will have a variable number of rows that differ from one report to the next, I haven't encountered a fucnction that will allow you to add rows.
I'm assuming this must be done with VBA.
Well you can do it manually, but it would take ages. So VBA would be good, particularly as you would be able to generate future reports quickly.
My interpretation of what your saying is that each row in your report will be the total for one customer ID. If it's something else, I imagine the below will still be mostly relevant.
I think it would be a bit much to give you the full answer, particularly as you haven't provided full detail but to take a stab at what you'd do:
Create your empty report page, whether it be a new worksheet or a new workbook
Loop through the table (probably using While next is not empty)
a. Identifying if a row is for a customer ID you haven't covered yet
i. If so then add a new entry in your report
ii. Else add it to the existing customer ID record (loop through until you find it)
Format your report so it looks pretty, e.g:
a. Fill the background in white
b. Throw in some filled bars
c. Put in good titles and totals etc.
For part 1, it might be better building an array first and then dumping the contents into the report. It depends how process intensive it will be - if very intense, an array should shave off time.

Report on users who don't estimate well in Excel

I have a spreadsheet corresponding to entries of a user, their estimation, and the actual value (for example: hours for a particular project - again, this is only an example), which we can represent in CSV like:
User,Estimate,Actual
"User 1",5,5
"User 1",7,7
"User 2",3,3
"User 2",9,8
"User 3",6,7
"User 3",8,7
I'm trying to build a report on these users, to quickly see which users underestimate or overestimate, and so I created a pivot table. But, I can't figure out how to simply show if a user has underestimated at some point. I tried to create a calculated field like =IF(Estimate > Actual, 1, 0), but this sums, then compares the Estimate and Actual columns and tells me that "User 3" doesn't over/underestimate.
Without adding an additional field to my data, how can I accomplish this?
A similar SQL pseudo-query would be:
SELECT DISTINCT al.User,
(SELECT COUNT(*) FROM ActivityLog AS l2 WHERE l2.User = al.User AND l2.Estimate > l2.Actual) AS Overestimates
FROM ActivityLog AS al
Edit:
I'm still working on this, and currently have created a static list of users in some cells on the side, and have given them the Array Formulas: {=SUM(IF((A$2:A20 = F6)*(B$2:B20 > C$2:C20), 1, 0))} and {=SUM(IF((A$2:A20 = F6)*(B$2:B20 < C$2:C20), 1, 0))} (if I have the user's name in F6).
Mainly, I want to do this where the list of users can populate dynamically from the main data.
Calculated fields in pivot tables stink. I would get rid of the pivot table and do it with formulas. Start a unique list of users in H15 and enter this in I15
{=MAX(($A$2:$A$7=H16)*($B$2:$B$7-$C$2:$C$7<>0))}
array entered. This will return 1 if they ever over or under estimated and zero if they never did. The downside is that you can't "refresh" it like a pivot table so you have to make sure your unique user list is accurate all the time.
If that's too big of a downside, I think you'll need to add a column to your source data. Specifically
=ABS(B2-C2)
And add that to your pivot table. It will show zero for never over/under and non-zero otherwise.
You are aware that you should make sure the estimates are all in the same range? Smaller numbers can be estimated better (when talking about hours).
Add a column for actual-estimate
then summarize those values for min max and average. (or stddev)

Resources