The Spotfire Community is moving to TIBCOmmunity and this forum location has closed. During the transition, you can still search the old forums but posting has been disabled. We encourage you to pick up the discussion at the new Spotfire community on TIBCOmmunity.
How to insert column to flag which rows are marked? - TIBCO Spotfire Community

How to insert column to flag which rows are marked?

Last post Tue, Feb 12 2013 12:42 AM by Vishal_11. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • Fri, Feb 18 2011 5:26 PM

    • boudreau
    • Top 500 Contributor
    • Joined on Fri, Feb 18 2011
    • Posts 5

    How to insert column to flag which rows are marked?

    I've been trying to figure out how to insert a column flagging which rows in an analysis are filtered in vs. filtered out and I can't seem to find a decent way to do it. I would assume that there is a row property somewhere that I can reference to get this data but I can't seem to find it.

     Has anyone done this via a custom calculated column or using a script??

  • Wed, Mar 2 2011 3:36 AM In reply to

    • EranS
    • Top 10 Contributor
    • Joined on Mon, Oct 12 2009
    • Israel
    • Posts 377

    Re: How to insert column to flag which rows are marked?

    Hi,

    If you can add a step to the filtering then this is easy.

    Once you get to view the records you need mark all of them and use the right mouse click to do a "filter to".

    When doing this a new field is created called "filtered at <exact time>" now you can rename or use this new item for your needs.

    Do not undo your actions or the field will disappear, rather click the reset filters button to allow all data again. You may still unmark the "No" in the new field to return to the filtered data.

    One more option is creating a bookmark: bookmarks mark records behind the scenes but can also be used as user actions in text areas.

     

    Best Regards,

    Eran

  • Wed, Mar 2 2011 4:06 PM In reply to

    • boudreau
    • Top 500 Contributor
    • Joined on Fri, Feb 18 2011
    • Posts 5

    Re: How to insert column to flag which rows are marked?

    Thanks for the reply Eran. What I'm trying to do with this is use the column in an over statement ranking a column (Trouble Code) by the sum of another called Duration. The problem is that when users run this analysis they are filtering in and out different countries, business units, years, etc... and they will be adjusting the filters frequently.

     I've tested the "filter to" solution and although the "filtered at <time>" column switches it's name from what I name it ("Filtered") back to "filterd at <time>", the ranking formula remembers the column as it retains it's mapping (this is good).

     The problem is that any time a consumer would touch the filters in the analysis they would have to reset the "filtered at..." filter, mark all data from the analysis (bar chart) again and perform another "filter to" in order to re-rank the data with the new filters. I'm afraid that this is going to confuse most users as it's not very intuitive. Also, if they were to only filter in on a narrower data set (say from a year down to a specific quarter and leave the rest) they will still see the bar chart and may still see the top ranked groupings as well, making the assumption that the ranked groups have been automatically updated.

     My hesitation with a bookmark is that in this particular analysis there are 7 key filters the consumers will be using which could create hundreds of combinations of data they are interested in.

     I understand these solutions both offer ways to view row markings so I apologize for not being specific enough with my question. I was originally trying to do this with IronPython but could't find a suitable solution with that either.

  • Wed, Mar 2 2011 5:47 PM In reply to

    Re: How to insert column to flag which rows are marked?

    Hi. Maybe I miss something here, but couldn't you use a details visualization for that? Kind regards, Christof
    -----------------------------------
    Dr. Christof Gaenzler
    Sr Solutions Consultant
    TIBCO Spotfire
  • Wed, Mar 2 2011 6:53 PM In reply to

    • boudreau
    • Top 500 Contributor
    • Joined on Fri, Feb 18 2011
    • Posts 5

    Re: How to insert column to flag which rows are marked?

    I don't think a details visualization would work because there is no way to access the attribute of the data set denoting whether it is marked or not by using a custom expression. When you "filter to" you create a tangible column with data that you can use in an expression like below:

    COLUMN="RANKING"
    if([Filtered to at 1:46:56 PM]="Yes",DenseRank(Sum([Duration]) OVER ([Trouble Code]),"desc"))

     I then use this new column in my Color By expression along with a property control called TroubleSlider to let the user show the top categories and groupt the rest as "OTHER":

    COLOR BY=
    <if([RANKING]<=${TroubleSlider},[Trouble Code]," OTHER")>

     This way the top groupings for the filtered data set are shown whereas the rest are grouped in "OTHER". If you try to perform the ranking and over expression in the Color By custom expression without having a way to key on only filtered rows ("Filtered to") you end up with a ranking over the entire data set, not just the filtered data.

     Using IronPython I can loop through the data to get the index of which rows are filtered in/out but I can't use this information to write in a new column and I would have to push a button to execute the script.

  • Thu, Mar 3 2011 3:12 AM In reply to

    • EranS
    • Top 10 Contributor
    • Joined on Mon, Oct 12 2009
    • Israel
    • Posts 377

    Re: How to insert column to flag which rows are marked?

    Hi again,

    I think there is another great feature by Spotfire called tagging.

    Using the panel as you work you can have multiple filtering schemes and assignment to data.

    It also creates new fields you can use in your calculations.

    Try it out and let me know if this is better for your needs.

    Best Regards,

    Eran

  • Thu, Mar 3 2011 11:42 AM In reply to

    • boudreau
    • Top 500 Contributor
    • Joined on Fri, Feb 18 2011
    • Posts 5

    Re: How to insert column to flag which rows are marked?

    I've tagged the data but this would require me to pre-tag all data in the analysis depending on all possibilities of filter combinations. Meaning I would have one tag for every filter combination like:

    2009, Q1-Q4, USA, HORIZONTAL
    2009, Q1-Q3, USA, HORIZONTAL
    2009, Q1-Q2, USA, HORIZONTAL
    2009, Q1, USA, HORIZONTAL
    2009, Q1-Q4, USA, VERTICAL
    2009, Q1-Q3, USA, VERTICAL
    2009, Q1-Q2, USA, VERTICAL
    2009, Q1, USA, VERTICAL
    2009, Q1, NORWAY, VERTICAL
    2009, Q1, CANADA, VERTICAL

    Etc....

    So the different combinations of filters I would have to have tags for would number in the hundreds.

  • Tue, May 31 2011 2:57 PM In reply to

    • dbzedler
    • Top 500 Contributor
    • Joined on Tue, May 31 2011
    • Posts 6

    Re: How to insert column to flag which rows are marked?

    ^bump^

    This question still hasn't been answered, and I'd like to know how to do this as well.

    Doug

  • Tue, May 31 2011 3:06 PM In reply to

    Re: How to insert column to flag which rows are marked?

    Can you please put this into our support system (http://support.tibco.com) as enhancement request. I might miss something, but I don't think there is an easy way to do this currently.

    Thanks,
    Christof

    -----------------------------------
    Dr. Christof Gaenzler
    Sr Solutions Consultant
    TIBCO Spotfire
  • Tue, Sep 27 2011 1:13 PM In reply to

    • BobCain
    • Not Ranked
    • Joined on Tue, Sep 27 2011
    • Posts 1

    Re: How to insert column to flag which rows are marked?

    I have run into similar issues and have a work-around that may be helpful. In my case we wanted to use a ranking function to force cross tables to show individual (not aggregated) results. I can do this with a ranking function as as part of a custom expression on the row axis, such as: . But we need values that are "filtered to..." to rise to the top of the ranking or the cross table looks bad therefor the ranking function above in the custom expression had to change to the following: The expression now will only rank those rows that have been set with the "Filter to marked rows" function. The problem is that it would be to complex to ask my users to manually mark all values then use the "filter to marked rows" function. It would also be difficult for the users to back out of these steps since they will not understand the "Filter to" filter device. The work around that we are trying is to have to buttons based on action controls: *Button 1, called "Reset cross table" performs 4 actions in series: Reset All Filters; Mark Filtered Rows; Filter to Marked Rows; Unmark Marked Rows. *Button 2, called "Compress cross table": Mark Filtered Rows; Filter to Marked Rows; Unmark Marked Rows. Button 1 resets the "Filter to..." columns so that it doesn't interfer with their filtering and so that it doesn't effect the cross table which uses that column. Button 2 then sets the "Filter to" column so that it has the desired effect on the cross table. We are trying this out on testers now to see if it is simple and robust enough. Hopefully someday there will be a column available that will give the "filtered to" status of a row. This would keep us from having to try these ugly work arounds!
  • Fri, Jul 13 2012 9:05 AM In reply to

    Re: How to insert column to flag which rows are marked?

    Hi Eran, Can you please elaborate on this line " One more option is creating a bookmark: bookmarks mark records behind the scenes but can also be used as user actions in text areas." Thanks
  • Sun, Jul 15 2012 4:22 AM In reply to

    • EranS
    • Top 10 Contributor
    • Joined on Mon, Oct 12 2009
    • Israel
    • Posts 377

    Re: How to insert column to flag which rows are marked?

    Hi,

    Bookmarks create a new field/filter named by the date/time the data selection was created.

    This new Field can be used as item property in a text area.

    Hope this helps,

    Eran

  • Fri, Oct 19 2012 7:32 AM In reply to

    • Brevans
    • Not Ranked
    • Joined on Fri, Oct 19 2012
    • Posts 2

    Re: How to insert column to flag which rows are marked?

    This feature was/is part of Spotifre; I dont know why it wasnt brought over :(

     In Spotfire Decision Site, you marked what ever records you wanted, then

     Edit, New Column, From Marked Records. 

    You also entered the NAME for the new column, the value for "marked" and the value for not marked

     Brad

     

  • Fri, Oct 26 2012 1:36 PM In reply to

    Re: How to insert column to flag which rows are marked?

    Now you can create the filter using Marked Records / Filter To... Tags are of course more powerful, but also with more clicks.
    -----------------------------------
    Dr. Christof Gaenzler
    Sr Solutions Consultant
    TIBCO Spotfire
  • Fri, Oct 26 2012 1:58 PM In reply to

    • Brevans
    • Not Ranked
    • Joined on Fri, Oct 19 2012
    • Posts 2

    Re: How to insert column to flag which rows are marked?

    thank you - this is helpful

     

    Is there any way to then change the NAME of this new column?

Page 1 of 2 (18 items) 1 2 Next >
┬ęCopyright 2000-2011 TIBCO Software Inc | Privacy Policy | Terms of Use I Blog I Contact Us I Content Center