Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
do with AGGR()
=Aggr(Sum({<Year={'$(vMaxYear)'}>}value) ,Brand,Product)
do with AGGR()
=Aggr(Sum({<Year={'$(vMaxYear)'}>}value) ,Brand,Product)
>>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)
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.
Thanks 🙂 it helps me a lot