Number with a lot decimals in pentaho cde table component - formatting

i have 4 columns in a table of pentaho cde. the 1st column is a string the second and third column are numbers with a lot of decimals. i want this numbers in this format ###,## how can i do it in table component of pentahop cde.

On the table’s Column formats property set those columns with format ‘%.2f’, and the others as ‘null’

Related

Cretae new column in table component of CDE dashboard of pentaho that represents the sum of 2 columns

I have a table component of cde with 8 columns. I want to create a new column that represents the sum of column 6 and 7. I try to follow something similar to grand total but I can not do it. some help? Thank you
you can right a javascript function in pre-execution under advance property of table and populate the sum in column where you wanted.

How to combine a row of cells in VBA if certain column values are the same

I have a database where all of the input from the user (through a userform) gets stored. In the database, each column is a different category for the type of data (ex. date, shift, quantity, etc) and the data from the userform input gets put into its corresponding category. For some of the data, all the data is the same except for the quantity. I was wondering how I could combine these rows into one and add the quantities to each other for the whole database (ex. combining the first and third data entries). I have tried playing around with a couple different loops but can't seem to figure anything out.
Period Date Line Shift Type Quantity
4 x 2 4/3/18 A 3 14 18
4 x 2 4/3/18 A 3 13 12
4 x 2 4/3/18 A 3 14 15
Thank you!
If you're looking to modify the underlying database, you might be able to query the data into the format you want by including all the other columns in a GROUP BY statement, save the result to another table, then replace the original table with the properly formatted one.
If you have the data in Excel and you just want to view it with the duplicate rows summed, a Pivot Table would be a good choice. You can select all the other columns as rows for the Pivot Table and sum of Quantity as the values.

DAX - selecting rows with partial match

I have a powerpivot table that contains 2 columns:
Column 1 contains strings.
Column 2 contains comma delimited strings.
I would like to be able to display all the rows from column 1 when rows from column 2 contains the selection from a filter or slicer. For example:
String Values
ABCD A,A,B
EFGH A,C
if A is selected I would display both rows, if B is selected I would display only row 1...etc.
I know I can split the records - but this is not practical for me - the above is only the top of the iceberg. VBA is out of the question since this will published in SharePoint. Anybody has an idea on how I could do that ? Thanks.
I found the solution in a blog from Javier Guillem:
http://javierguillen.wordpress.com/2012/02/10/simulating-an-approximate-match-vlookup-in-powerpivot/
If in my example the name of the table is "facts", I create a second unlinked table called dimRef that I populate with all possible values that I am interested to match: A,B,C,D...etc.
Then I define the measure M as:
M:=If ( Hasonevalue(facts[Values] ),
Calculate (
LASTNONBLANK (dimRef[String], 1 ),
Filter ( dimRef, SEARCH(dimRef[String],Values(facts[String]),1,0) > 0 )
)
)
I can then use the string column of the facts table and the measure in a pivot table and use dimRef as a selector. If filters the row as per the selection.
One small detail: the measure is not available in PowerView...Anybody knows why ?

Splitting Data in a Column

I get some data that comes in to the table.
This table is currently only displaying after I merged all the tables. So you currently see:
Table 1
union
Table 2
union
Table 3
The issue I have is now i have one column in there where it contains data like this:
AA2B133
I want to split this column, so in the current column it tries to keep the first 3 charachters and the other 4 charachters it goes into another column.
What is the best way or simplest way of doing this.
Thank you
You can use the RIGHT() and LEFT() functions to split the data into multiple columns.
For example:
SELECT LEFT(data,3), RIGHT(data,4)
FROM (SELECT 'AA2B133' AS data) A
Will return two columns with the breakout you requested.
You can use Java to get the 3 first caracters using this
String substring (String s, int start, int len)
so if you want to get the three first charachters for example you can do like this
String substring ("AA2B133",0,2)

column headings getting truncated

i am running my query via a unix script. i need column headings. For this i have used set heading on. my requirement is to pull data from a table concatinate it using a pipe, write it in a text file. i need column headings along with the data.this file needs to be sent as feed to some other party. my query is something like this
select column1||'|'||column2||'|'||column3||'|'||column4......
from table;
I have more than 100 columns in my query
in my oputput the column data comes up correct but the column headings get truncated. i see dashes i.e '------' instead of column names after three column headings are displayed.
the output is something like
column1||'|'||column2||'|'||column3||'|'||col
--------------------------------------------------------------------------------
20-APR-13|0.990000|0|0|Y|voice|yes|0|0
20-APR-13|0.990000|0|0|Y|voice|yes|0|0
( in the above exmaple i tried with 9 columns. i can see data for 9 columns but the headings after 3 column headings the fourth one is truncated and rest are not displayed.)
I couldn't paste my original query with more than hundred columns here.
Can somebody let me know how to resolve it.
Use the configuration of the shell to set the column size:
COLUMNS=1024
stty columns 1024