Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rglenn0780
Contributor

Set Analysis with Revenue Variable

Hello,

We have changed our revenue to a variable calculation. I am trying to enter in an equation that will use our revenue variable and work within the following set analysis. When I update to the variable, I get 0's, so I am not sure if it is working correctly. Any thoughts would be great thanks!

Before:

=sum({$<[Year Breaks]={"0-2 years"}>}[Revenue (dollars)])

Attempt:

=sum({$<[Year Breaks]={"0-2 years"}>}$(vRevenue$))

Tags (1)
4 Replies

Re: Set Analysis with Revenue Variable

How do you set the variable ?

rglenn0780
Contributor

Re: Set Analysis with Revenue Variable

I set the variable to look at budgeted and actual based on years.

Variable:

if(sum(if(Year>2016 and [Financial View]='Budgeted',[Revenue (dollars)],if(Year<2017 and [Financial View]='Actual',[Revenue (dollars)],0)))=0, '-',

sum(if(Year>2016 and [Financial View]='Budgeted',[Revenue (dollars)],if(Year<2017 and [Financial View]='Actual',[Revenue (dollars)],0))))

prabhakar_vammi
New Contributor

Re: Set Analysis with Revenue Variable

Hi Russell,

This will work for you:

=sum({$<[Year Breaks]={'0-2 years'}>} $(vRevenue))


While caculating the variable, use = sign before the calculation in variable overview window. Like vRevenue = sum(Revenue).

rglenn0780
Contributor

Re: Set Analysis with Revenue Variable

Hi Prabhakar,


Thanks for your reply.

In terms of variable window, do you mean to edit the variable specifically and add an equals sign at the beginning of

Variable:

if(sum(if(Year>2016 and [Financial View]='Budgeted',[Revenue (dollars)],if(Year<2017 and [Financial View]='Actual',[Revenue (dollars)],0)))=0, '-',

sum(if(Year>2016 and [Financial View]='Budgeted',[Revenue (dollars)],if(Year<2017 and [Financial View]='Actual',[Revenue (dollars)],0))))

Thanks,

Community Browser