Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select only one part of a dimension in a table

Hello,

I have a fact table with the following dimensions:

  • Invoice
  • Product
  • Year
  • Value

I would like to have a table that shows:

Product2015 Sales2014 Sales

I can do it just fine with set analysis, of course:

=Sum ({$<Year={'2015'))},[Value]).

=Sum ({$<Year={'2014'))},[Value])

The thing is that I would like to show only products with 2015 sales in my "Product" column, and keep the 2014 sales column. I'm not sure how I can do this.

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

The easiest way is to condition the second expression on the value of the first expression, like this:

=

IF([2015 Sales] <> 0,

     Sum ({$<Year={'2014'))},[Value])

)


cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

View solution in original post

5 Replies
krishna_2644
Specialist III
Specialist III

Try Using:

Aggr(Only({$<Year={'2015'}>}Product),Product)

Edit: If that expression isnt working, post a demo document or some sample data/

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

The easiest way is to condition the second expression on the value of the first expression, like this:

=

IF([2015 Sales] <> 0,

     Sum ({$<Year={'2014'))},[Value])

)


cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

sunny_talwar

May be something like this:

Capture.PNG

nizamsha
Specialist II
Specialist II

Hi

Do u want to show 2014 and 2015 sales in a straight table is that correct

then you need to nullify the year in the set analysis

if its so mean

CY

sum({$<year={"$(=Max(Year))"}>}Sales)

LY

sum({$<year={"$(=Year(Max(Year)))-1"},Year=,Month=>}Sales)

or

sum({$<year={"$(=Max(Year)-1)"},Year=,Month=>}Sales)

Not applicable
Author

Yes, thanks! That's simple. I also ticked the option to not show null values.