Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the following table
YearMonth , Revenue, Category
2013-1-1, 100,A
2013-2-1,200,B
If I use one pivot table to show the data, use YearMonth and Category as Dimension, and Sum(Revenue) as the Metric in expression.
What I want it, I want to get the Current row's YearMonth in the Expression.
Take example, the first row is 2013-1-1 in Dimension, which function I can use to capture that the current YearMonth is 2013-1-1?
Thanks.
You can directly write : =YearMonth in the expression.
But when I use this one, it does not work:
=Sum({<YearMonth={'=$(=Only(YearMonth))'}>} Revenue) YearMonth is the dimension
Hi,
You can use YearMonth directly.
Also it depends on what expression your using Aggr or Sum.
Can you explain little bit more about the purpose of it.
Why your going for this kind of expression?
Sum(Revenue) will give you the Revenue for the YearMonth value in the dimension.
Because I want to re-write the YearMonth
Take an example:
If YearMonth =2013-3, I want to show the revenue 2013-2 and 2013-3, the latest 2 months revenue in YearMonth 2013-3
You need something like this
Sum(Revenue)+Alt(Above(Sum(Revenue)),0)
Can we use the Set Analysis to achieve it by change the YearMonth?
No.Set analysis will work based on dimension.
Try this
sum(if(YearMonth=Aggr(NODISTINCT only(YearMonth),Category),Revenue))