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

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$))

4 Replies
Anonymous
Not applicable
Author

How do you set the variable ?

Anonymous
Not applicable
Author

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))))

Prabhu
Creator
Creator

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).

Anonymous
Not applicable
Author

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,