Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic Lable names and expression issue

i have a project name='Yldnzav Eenqllaoa- Mjmeamro X'

if i select above project, in chart it should show savings for that project

savings 2015,savings 2016,savings 2017(After contract Term years expression)

how to name the lables dynamically?

how to calculate expressions for savings 2015,savings 2016,savings 2017


formulae for savings:(savings/3)


sample output:

year        savings 2015     savings 2016       savings 2017

2015          $16,667             $0                       $0

2016             $0                 $16,667              $0

2017            $0                    $0                  $16,667      




please find the attached sample application 

3 Replies
Anonymous
Not applicable
Author

It depends on your data model, could share a picture of it ?

Anonymous
Not applicable
Author

hi Bill  thanks for your time

here is the data model

New Year is the year field .

settu_periasamy
Master III
Master III

Hi,

you can try the below expressions.

instead of if condition, you can use the set expression

Savings 2015:

=(sum({<NewYear={'2015'}>}[Budget/Forecast])-sum({<NewYear={'2015'}>}[Managed Spend]))/3

Savings 2016:

=(sum({<NewYear={'2016'}>}[Budget/Forecast])-sum({<NewYear={'2016'}>}[Managed Spend]))/3

Savings 2017:

=(sum({<NewYear={'2017'}>}[Budget/Forecast])-sum({<NewYear={'2017'}>}[Managed Spend]))/3