Adding Columns to Existing DataTable Programatically - spotfire

Are there any other possible ways to add columns to a data table within Spotfire, besides the method mentioned here: Spotfire add column from python list? I'm asking because the method works for a particular field that I have, except when the values are NULL (obviously cannot perform a join operation on a field, which is NULL).

I was able to solve the issue through creating a calculated column that uses the row IDs to perform the join so the nulls would never interfere with the join.

Related

Power Query how to make a Table with multiple values a parameter that uses OR

I have a question regarding Power Query and Tables as parameters for excel.
Right now I can create a table and use it as a parameter for Power query via Drill down.
But I'm unsure how i would proceed with a Table that has multiple values. How can a table be recognized with multiple "values" as a parameter
For example:
I have the following rawdata and parameter tables
Rawdata+parametertables
Now if I wanted to filter after Value2 with a parameter tables I would do a drill down of the parameter tables and load them to excel.
After that I have two tables that I can filter Value2 with an OR Function by 1 and 2
Is it possible to somehow combine this into 1 Table and that it still uses an OR Function to search
Value2
Im asking because I want it to be potentially possible to just add more and more parameters into the table without creating a new table everytime. Basically just copy paste some parameters into the parameter table and be done with it
Thanks for any help in advance
Assuming, you use Parameters only for filtering. There are other ways, but this one looks the best from performance point of view.
You may create Parameters table, so you have such tables:
Note, it's handy to have the same names (Value2) for key column in both tables, otherwise Table.Join will create additional column(s) after merging tables.
Add similar step to filter RawData table:
join = Table.Join(RawData, "Value2", Parameters, "Value2")

How do I create a measure in Power Pivot that pulls a value from another table?

I have two tables that use a unique concatenated column for their relationship. I simply want to make a measure that uses the values from C4 of Table1. I thought I could use a simple formula like =values(Table1[C4]) but I get an error of "A table of multiple values was supplied where a single value was expected."
Side note: I realize the concatenation is unnecessary here in this simple example, but it is necessary in the full data I am working with which is why I added it into this example.
Here's a simplified set of tables for what I am trying to do:
Table1
Table2
Relationships
First you should think. Do I really need a Calculated column? Can't this be calculated at runtime?
But if you still want to do it, you can use RELATED or RELATEDTABLE.
Keep in mind if you are pulling from RELATEDTABLE, returns many values. So you should apply some type of aggregation like SUMX or MAXX.
You can use context transition to retrieve the value.
= CALCULATE(MAX(Table1[C4])

Spotfire How column reranks when data is limited by expression or filtered?

I have a shapefile in Spotfire and in the tableview of it I have a column displaying DenseRank. For example, if limit data by expression from the full 100 rows in the table to just 30, the DenseRank does not change. How can I perform this task?
Thanks,
Chris
Tableview does not allow dynamic calculations, unless you have a Document Property in the expression, The calculated column expression executes whenever Document Property value chane (or Calculations refreshed), for your scenario I think instead of using filter create a property control with Fixed values (10,20,30...100) or Values from a column (the one you are using to filter data). and use Document Property linked to the Property Control in your Calculated Column Expression .....
I found a workaround to dynamically rank data based on filtering or marking. If you create a data function as simple as "tableout <- tablein" then you can pass the original filtered and/or marked table to a new table. From there, insert calculated column on the new table and it will recalculate each time.

Responsys - How to field merge multiple rows on one column using RPL?

Basically, I need to field merge a field in a certain table. Let's say TableA.Col1.
The syntax ${TableA.Col1} works perfectly. However, it only shows the first row of data in the table, whereas, I need to field merge the second row of the data as well.
Any suggestions?
I am trying like an array call ${TableA.Col1[0]} or ${TableA.Col1[1]} but no luck.
Hope to meet some Responsys guru here.
Thank you!
You need to use the <#data> directive to pull multiple records from a supplemental table. Interpolations with Table.Column syntax are designed for 1->1 relationships so will only pull the 1st record.

Cassandra: how to filter more then one column

Is it possible to filter more than one column?
I want to give the user an option to filter informations, all written in one table. I add Indexes to my table but with these it was not possible to filter more then one column.
Values could also be null, so it is not possible to define them as clustering columns, is it?
There are several types of queries you can do in CQL that return more than one row.
The most common and efficient are range queries based on a clustering key.
Another method is to use the IN clause with a SELECT statement.
But Cassandra has a lot of restrictive rules on when you are allowed to do these types of queries and on which types of columns.
See more details here: A deep look at the CQL WHERE clause

Resources