Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression independet from a dimension

Hi Community,

I tried to calculate a so called "Evolution Index".

For this I have:

  • Line Chart Dimension is fiscal month (1. month is april)
  • Expression this should sum up a field and compare it with the sum of the first month. This should be done for each month of the dimension.

I tried something like this:

sum({<FiscalYear={2016}>}SALES) - sum({<FiscalYear={2016}, FiscalMonth={'April'}>}SALES)

But now it is just calculating for fsical month April.

How can I do a expression independet from a dimension?

Thank you for your help.

Kind regards

Philipp

3 Replies
sorrakis01
Specialist
Specialist

Hi,

Try this

sum({<FiscalYear={2016}>}SALES) - sum({1<FiscalYear={2016}, FiscalMonth={'April'}>}SALES)


Regards

sunny_talwar

Try this:

Sum({<FiscalYear={2016}>}SALES) - Sum(TOTAL {<FiscalYear={2016}, FiscalMonth={'April'}>}SALES)

or if you have more than one dimension, you might need this:

Sum({<FiscalYear={2016}>}SALES) - Sum(TOTAL <DimensionName> {<FiscalYear={2016}, FiscalMonth={'April'}>}SALES)

effinty2112
Master
Master

Hi Philipp,

          Try this:

sum({<FiscalYear={2016}>}SALES) - sum( TOTAL <FiscalYear>{<FiscalYear={2016}, FiscalMonth={'April'}>}SALES)

EDIT: Sunny's right, my <FiscalYear> clause is not required.

cheers

Andrew