How to show the top 10 column values in Spotfire - tibco

I need to show top 10 values using Spotfire. I googled lot but I could not find the best solution.
I followed this tutorial: Creating a Dynamic Top Ten Chart but did not find success.
How can I do this?

How to limit a visualization by the top 10 values:
There are 2 ways you could do this. I will list them both with pros/cons.
Method 1 - Visualization Level
Open your visualization's properties and go to the Data tab.
Select "Edit..." under "Limit data using expression:" and include the following expression: Rank([values],"desc")<11 where [values] is the numeric column you want the top 10 of.
Example below. Note all of the filters are untouched on the right.
Method 2 - Analysis Level
Insert a calculated column with the following expression: Rank([values],"desc").
Use the built in filters to only include Rank 1-10 for the top 10. This will filter all of your visualizations in your given filtering scheme to just the top 10.
Example below. Note the RANK filter on the right and how I have it narrowed down to a max of 10.
Let me know if you are still having issues.
Edit: Right click and open image in a new tab if you are having trouble seeing the content of my screenshots. The source imgur link should have the larger resolution viewable.

Within the Properties > Show/Hide Items, you can add a rule to show only the top 5 or 10 items by the Value Axis.

To do a Top 10 Report in Tableau.
Approach 1:(Query level)
Using custom sql : Edit your custom sql to something like this.
select top 10 * from table order by Id desc
Approach 2:(Report level)
Using Index
1.Create a calculated field. `Index()`
2.Change it to discrete.
3.Drag it to column shelves(It should be the first column)
4.Change it to continuous drag it to filters shelves and select `1-10`

https://googletpoint.wordpress.com/2015/04/24/how-to-show-top-10-values-in-spotfire-6-5-2/
Check the above link.. It will be helpful

Related

BIRT Report Designer - Table to Produce Rows in Multi Columns

I have a table, which is listing the name of benefits and it is only 1 column (just name of the benefit).
I'm wondering if there is any native function of BIRT Report Designer to produce rows not only vertically but also populate horizontally to 3-4 columns.
Something like below:
Benefits List
Benefit-1 Benefit-3 Benefit-5
Benefit-2 Benefit-4 Benefit-6
Thanks in advance for any advice.
Ok, I found a solution!
Under the following link there is a Eclipse Community Page Link recommendation about an additional computed column. Even though I don't have any computed column, the recommendation gave me an inspiration. Instead of creating an additional column, I used the rownum that is used generally to bind dataset parameter. For the table row, I created "visibility" condition that checks if the rownum + 1 is divided by 3. Depending on what is the result, it will be hidden or viewed:
Main Grid
It includes a grid with 2 rows and 3 columns. 1 row is merged to view the header. In each column of second row, the same table is placed with the same dataset.
Image Showing Main Structure
Select Table Row
Image Indicating Row Selection
Set the Visibility
Image Showing Details of Visibility Condition
The syntax basically means: "Do not show the row if the division result is not 1".
For the second column, you will need to compare with 2: (row.__rownum + 1) % 3 != 2 and the third column with 0: (row.__rownum + 1) % 3 != 0
Hope it'll be helpful for someone.
An more straightforward approach ist to use a List item instead of a Table item.
In the detail area of the List, create a Grid item of fixed width and height.
Put the content (e.g.) text into the grid's cells.
Important: Set the "display" property of the grid to "inline" instead of the default "block".
This way BIRT will put the grids from left to right until the line is full.
Then it will fill the next line (think of "display: inline" like adding words to a paragraph).

Indicators in a matrix

I'm trying to add some indicators into a matrix to show an increase or decrease from the previous year
This is my design view
And this is how it's viewed in the report
I would obviously like my up and down arrows to appear in the currently empty columns. Also I'm wondering if there is a way of deleting the first empty column after 2014/15 as there is no year to compare it to.
SSRS supports a function called Previous, which will be useful in your scenario. Assuming that the name of your column group is "Fiscal", the difference of two years can be calculated as
=Count(Fields!IDNUMBER.Value) - Previous(Count(Fields!IDNUMBER.Value), "Fiscal")
Because you can't know the range of the numbers in advance, I suggest to use a "numeric" expression like
=Sign(Count(Fields!IDNUMBER.Value) - Previous(Count(Fields!IDNUMBER.Value), "Fiscal"))
for the indicator, so the ranges can be defined by single values -1, 0 and 1:
To hide the first indicator column, right-click the column header in design view and click Column Visibility..., then in the cnfiguration dialog specify to hide based on an expression like
=IsNothing(Previous(Fields!Fiscal.Value, "Fiscal"))
Here's a screenshot of my design view:

SSRS Scope with Row and Column groups issues

I'm trying to get percentage calculated for my tablix and have problem on very last column, which is outside of Column Group, can't make it work, I can't use Dataset as I have a filter on tablix level. Pic below illustrates all my setup. I Understand if you stay inside the box then you have all right scopes, curious if I can do any right click and see what scope is ??)
I need somehow to get value =1837 to use in pink boxes.
I tried to digest error message and tried all combo but not helps
Is this doable?
You can refer to your very last column which is outside the groups and the deatils with the following expression. Lets say your Total from YTD is in Textbox1. Then you can refer to this textbox (because its outside the detail rows):
=ReportItems!Textbox1.Value 'Result: 1837
But a better way to calculate the percentage in the pink boxes would be the following expression (this expression comes in the pink box):
=Sum(Fields!YTDDetail.Value, "TurnDays") / Sum(Fields!YTDDetail.Value, "Dataset")
This way you are dividing the grouped sum with the whole sum, which should result in your percentage if you format the output of the texbox as Number > Percentage.

Hide some charts and show other in one report

I have a report with 24 charts, one for each hour of the day. The user can choose to show one, a couple, or all the charts, based on a drop down. The drop down is tied to a parameter that allows multiple values. See below:
The problem is that if the user chooses one or a few hours from the drop down, all the charts show, and the one(s) chosen give data while the others say "no data available".
Currently for each chart I've added the following to show data if the value was chosen in the drop down:
=Switch(Parameters!HOURINPUT.Value(0) = "0", false)
Is there a way to hide the charts that the user did not choose from the drop down?
It would look nicer to hide the chart and see only the ones chose than have a blank box that says "no data available" in them.
UPDATE:
More than one parameter.
Assuming that the only differences between the charts are the hour of the day specified, then I suggest:
Add a new dataset to the report with values 0 to 23 as selected in the entered HOURINPUT parameter - something like: with cte as (select 0 n union all select n+1 n from cte where n < 23) select n report_hour from cte where n in (#HOURINPUT)
Add a new tablix to the report, with a single detail cell only, bound to your new dataset.
Move one of the existing graphs into the new table's detail cell so that it becomes a subreport, replacing all hard-coded time references in the graph with references to the report_hour value from the new dataset.
You can then remove the other 23 graphs.
In addition to ensuring that graphs are only displayed for the times selected, this should also simplify future maintenance of the report, since any changes required to a graph will only have to be entered onto the one graph (instead of all 24).

Interactive sorting to matrix report in reporting services 2005

i created a matrix report that have 2 rows and 6 columns.
picture 1 (see album picture in the bottom)
i want so active a interactive sort on the last columns that named 'Matrix1_ObjName'.
to do so i clicked right click on the field and go to properties > interactive sort.
than i entered the parameters like in the picture 2 (see album picture in the bottom).
i have done some research and the closes answer was posted on this link
the interactive sort doesn't work.
to be clear i want that the LoginName column will be sorted by the grade that shown in the objName row.
sea picture 3 (see album picture in the bottom)
album pictures
thanks to all...
I never use interactive sort. When I want to be able to change sorting behavior, I do it with a parameter. Create a new report parameter and specify values. Use something descriptive for the labels, then I use integers beginning at zero for the values. After the param is set up right click on a field in report design and go to Row Group then Group Properties. Select Sorting from the menu and build an expression with an if statement similar to this:
=IIf(Parameters!sort.Value=0,Fields!First_Sort.Value,Fields!Second_Sort.Value)
Might help you.

Resources