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: 
Not applicable

Is it possible to "ignore" dimension for one expression ?

Hi,

my case is much more complex but basically : i have month of year as a dimension  and a few expressions in a pivot table. Is it posible to "ignore" dimension in one of expressions ? For example expression is sum(Price) but i want sum of prices for prior six months, in january i want that result for this expression is sum of last six months in back year (this six months are not and visible in this chart) ? 

Thanks in advance

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try this as expression in your pivot table:

aggr(rangesum(above(sum(Price),1,6)),YearMonth)

View solution in original post

13 Replies
swuehl
MVP
MVP

Basically, you can use the TOTAL qualifier in an aggregation function to ignore the dimension:

=sum(TOTAL Price)

ariel_klien
Specialist
Specialist

Hi,

you can use Set Analysis.

like this: sum({ <month=>} price)

you can put inside how mach months that you want...

BR

Ariel

Not applicable
Author

I think that TOTAL ignores chart dimensions but  calculate  over all possible values in the current selections .

swuehl
MVP
MVP

Right, so you would probably need to apply either set analysis in addition to the TOTAL or not using TOTAL, but rangesum(above(sum(Price),0,6), something along this.

It would be easier if you could post a small sample app, together with your requested result.

Not applicable
Author

Ariel,

thanks for answering my question but with Set Analysis I can only get zero values for months that are not selected in Set  Analysis

Not applicable
Author

Swuhel,

I use rangesum in similary cases but  think  that for rangesum cells for prior six months (in back year) must be "visible" . In my dimension are only months from this year and for january i need sum from july-december in previous year. I will check this solution.

Thanky you very much and greetings from Croatia

swuehl
MVP
MVP

As said, it would help us to help you if you could post some more details about your setting (best in a small sample app that demonstrate your issue).

You could look into something like shown here:

http://community.qlik.com/message/245768#245768

or maybe prepare your accumulated values in the script. Don't know which way to go yet.

Not applicable
Author

Swuehl, I will start with link that you provide in your post and then if i cant solve my problem will come back here.

Thanks

Not applicable
Author

Swuehl,

in attachment is a simple example of what i want.

Thanks in advance.