3 Replies Latest reply: Dec 29, 2010 8:49 AM by Mads Grathe RSS

    Help with if expression in chart

    Mads Grathe

      Hi guys,

      New to qlikview and to the forums so bear over with me [:)]

      I'm trying to get a graph to show a calculated value for a selected group of cells.

      I have 3 columns in my data: UserID, LoginDays and Sales.

      I want to find the average sales per user, but only for users with a certain amount of LoginDays.

      I've tried with a simple "if" statement, but I can't get it to work... Anyone?

      Here's what I've been trying:

       

      if(LoginDays>5,sum(Sales)/count(distinct UserID),0)