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: 
Kevinchinese
Contributor II
Contributor II

How to ignore the dimension in a table

Hello,

I have a table with "Brand", "Product" and "Country" are dimensions. 

Two measures as below: 

1.  Sum({<Year={'$(vMaxYear)'}>}value) .... 'value' is a filed, 'vMaxyear' is a variable.

2.  I need another expression to calculate the sum of value according to Brand and Product.  I don't know how to write this expression, how to ignore the dimension with Country field.

Thank you for your help.

 

 

Labels (1)
1 Solution

Accepted Solutions
Channa
Specialist III
Specialist III

do with AGGR()

 

=Aggr(Sum({<Year={'$(vMaxYear)'}>}value) ,Brand,Product)

 

 

Channa

View solution in original post

6 Replies
Channa
Specialist III
Specialist III

do with AGGR()

 

=Aggr(Sum({<Year={'$(vMaxYear)'}>}value) ,Brand,Product)

 

 

Channa
jonathandienst
Partner - Champion III
Partner - Champion III

>>1. Sum({<Year={'$(vMaxYear)'}>}value) .... 'value' is a filed, 'vMaxyear' is a variable.

Not sure what the question is here. You could probably lose the quote marks if vMaxYear is numeric.

>>2. I need another expression to calculate the sum of value according to Brand and Product....

Use a partial total:

=Sum({<Year = {'$(vMaxYear)'}>} TOTAL <Country> value)
or
=Sum({<Year = {$(vMaxYear)}>} TOTAL <Country> value)

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Nishanthi
Contributor II
Contributor II

Sum(Total<Dimension>{<Year={'$(vMaxYear)'}>}value) can be used to ignore the particular dimension. If more than one dimension have to included you can do that with comma separated.

Kevinchinese
Contributor II
Contributor II
Author

Thank you very much, I will do the test.
Kevinchinese
Contributor II
Contributor II
Author

this expression is working. Thanks again 🙂
lmartint
Contributor
Contributor

Thanks 🙂 it helps me a lot