Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

whats wrong with this expression

it says error in this expression, but I don't know why:

if(Keynumber='Orders',count(order_id),

if(Keynumber='Revenue',sum(amount),

if(Keynumber='Conversion',sum(first),

if(Keynumber='New Users',count(DISTINCT(user_id),

if(Keynumber='New Subscriptions',sum(new)-sum(cancelled)))))))

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I think you need:

if(Keynumber='Orders',count(order_id),

if(Keynumber='Revenue',sum(amount),

if(Keynumber='Conversion',sum(first),

if(Keynumber='New Users',count(DISTINCT user_id),

if(Keynumber='New Subscriptions',sum(new)-sum(cancelled))))))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I think you need:

if(Keynumber='Orders',count(order_id),

if(Keynumber='Revenue',sum(amount),

if(Keynumber='Conversion',sum(first),

if(Keynumber='New Users',count(DISTINCT user_id),

if(Keynumber='New Subscriptions',sum(new)-sum(cancelled))))))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein