Reputation: 25
So my original table is like this:
And I want to compress the table which only shows that factoryID and the month, and the max output like this:
How do I do this with spotfire in table visualization?
Upvotes: 1
Views: 1631
Reputation: 380
c_month, c_max
for c_month, use the expression: Concatenate(Month([date]),"-",Year([date]))
for c_max, use the expression: Max([max]) OVER ([factory id])
If(Rank(RowId(),"asc",[factory id])=Min(Rank(RowId(),"asc",[factory id])),True)
//this will create a new calculated column which will give true only for every unique value of factory id.
Add a data table to your visualization
Add data limiter
Right click and under data --> Limit Data using expression, enter [c_rank] = true
Only add factory id, c_month and c_max to your column list.
Upvotes: 3
Reputation: 1827
To go from the top table to the bottom table:
Do these steps:
Concatenate(Month([Date]),"-",right(String(Year([Date])),2))
I created it as a new table but you do not have to.
Upvotes: 4