Visokio website     Downloads     Video tutorials     KnowledgeBase  
Variables: How to calculate proportions with dynamic formulas? - Visokio Forums
Variables: How to calculate proportions with dynamic formulas?
  •     Insightgroup August 29, 2013 4:50AM
    Imagine that you upload a data file with the two following variables. A dummy coded variable (indicating whether the observation remembers an ad) and a variable indicating the gender of the respondent (also dummy coded --> 1 and 0's). What we need Omniscope to do is to calculate the proportions of 1's to the total number of observations (1's + 0's). Note that it’s important that this proportion updates when we filter the data on e.g. gender.

    At the moment Omniscope only gives us the frequencies of 1's - i.e. we can’t get it to calculate the proportions automatically.

    Does anyone have any suggestions?

    Thank you in advance.
  • 3 Comments
  •     paola August 29, 2013 7:14AM
    You can use variables to switch the target value in the proportion formulas... Please see the demo attached.
    "Value choice" and "Gender choice" are variables, dynamically inserted into the formula. By making the filter choice, the same formula will be applied on a subset of the dataset, so you can calculate proportion of 'remember ad' on just male or just female group.
     
    Gender proportion for the value  [Gender choice] =
     
    SUBSET_NONEMPTYCOUNT([Gender],SUBSET([Gender],[Gender choice],"="))
    /
    SUBSET_NONEMPTYCOUNT([Gender])
     
      
    Value proportion for the value [Value choice] = 
     
    SUBSET_NONEMPTYCOUNT([Value],SUBSET([Value],[Value choice],"="))
    /
    SUBSET_NONEMPTYCOUNT([Value])  
  •     Insightgroup September 3, 2013 3:47AM
    Thank you very much for your answer. We do have some questions though :)

    Where do you apply the formula? As far as I can see, the data is "only" categorized in the field organizer..
    Do you create a new variable? If yes, where?

    Thanks
  •     paola September 3, 2013 4:31AM
    The above formulas were used in the Content view on the left... If you click on the 'Edit' button on the menu, then on the 'f(x)', you will access the 'Insert dynamic content' menu, where you can add or edit formulas, manage the indicators, dynamic styling and formatting.

Welcome!

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

Sign In Apply for Membership