Visokio website     Downloads     Video tutorials     KnowledgeBase  
Content View: Changing the display - 'No Value' - Visokio Forums
Content View: Changing the display - 'No Value'
  • SteveW June 15, 2012 6:25AM
    Hi,

    I am trying to create a formula in a Content View with the below formula:
    SUBSET_SUM([Position], INTERSECTION(SUBSET([Keyword rank],1), SUBSET([Week Rank],1)))

    This returns the value as expected, except for any instances where none of the instances occur it shows "(no value)" in my table.

    Is there a way to set the default (no value) to a blank space? I am sure that it is a simple formula but I can't seem to get it to work.

    Thanks
    Steve
  • 4 Comments
  • SteveW June 15, 2012 11:54AM
    I appear to have solved the problem now with the following formula:

    IF(SUBSET_FIRSTNONNULL([Keyword], SUBSET([Keyword rank],10))<>NULL,SUBSET_FIRSTNONNULL([Keyword], SUBSET([Keyword rank],10)),"")
  •     chris June 15, 2012 12:05PM
    Hi,

    Glad you resolved this issue. If you would like us to investigate whether there is an alternative formula you could use could you post some sample data for us?
  • SteveW June 15, 2012 12:19PM
    Hi Chris,

    Attached is a sample of the file. I think the next steps would be to write some JavaScript to alter the size of the table based on the number of keywords in the report.

    Thanks
    Steve
  • Soruban June 18, 2012 1:39PM
    Hi,

    If you need some pointers on how to use Javascript in the content view, you should read the following posts:
    - http://forums.visokio.com/discussion/1072
    - http://forums.visokio.com/discussion/1073/scripting-in-formulae-2.7-enhancements


    Here is also some basic code to get the table at the right size:
    <table>
    <th>
    <td>Keyword</td>
    <td>Position This Week</td>
    <td>Position Last Week</td> 
    </th>
    <#
    var keywords = subset_uniquesList("Keyword");
    var count = keywords.length;
    for(var i = 0; i < count; i++)
    {
    #>  
    <tr> 
      <td><#=keywords[i]#></td>
    <td><#=yourFormula#></td>
    <td><#=yourFormula#></td> 
    </tr>
    <# 

    #>   
    </table> 

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership