Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi - I am trying to create a variable that does the following:
Table fields:
SalesDate
QuantitySold
Variable:
vYearMaxQuantitySold:
=Sum({$<[SalesDate.autoCalendar.Year] = {$(=max([SalesDate.autoCalendar.Year]))}>}[QuantitySold])
I try the formula above - does not work - any thoughts ? Jerry
Hi @jerryr125
Try like this
vYearMaxQuantitySold
Sum({$<[SalesDate.autoCalendar.Year] = {$(=max([SalesDate.autoCalendar.Year]))}>}[QuantitySold])
And use in the chart like $(vYearMaxQuantitySold)
In the variable declaration, don't use = sign. Then it calculated the value n store in the variable. So if u use the variable in the chart, result might be wrong.
Variable:
vYearMaxQuantitySold =max([SalesDate.autoCalendar.Year])
=Sum({$<[SalesDate.autoCalendar.Year] = {$(vYearMaxQuantitySold)}>}[QuantitySold])
Hi @jerryr125
Try like this
vYearMaxQuantitySold
Sum({$<[SalesDate.autoCalendar.Year] = {$(=max([SalesDate.autoCalendar.Year]))}>}[QuantitySold])
And use in the chart like $(vYearMaxQuantitySold)
In the variable declaration, don't use = sign. Then it calculated the value n store in the variable. So if u use the variable in the chart, result might be wrong.