Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two dimensions called 'year' and 'week' that are derived from the 'Date' Field. I want to create a new dimension called 'DataYear' which is the multiplication of the dimensions 'year' and 'week'. But I am unable to use the dimensions in the expression editor. Only the fields show up.
So does that mean I can't use dimensions I created in the app to create another dimension?
p.s I know I can create a calculated field in the load script but I do not have access to it. So is there a way to handle this?
Thanks in advance
maybe this:
Sum( if (Year(Date) = Max( total Year(Date) ), Sales ) )
Regards
Hello @lost_rabbit ,
In the same way you created that two dimensions on Master items, you have to create a new calculated dimension in order to use it in any charts.
Ex. Calendar.Year & Calendar.Week
You can't use a master dimension in the chart expression editor.
Best Regards
Andrea
Say for eg. I want to calculate sum(Sales) for the recent year. If I had a field 'Year' in my data, I would use a set expression like this.
Sum({<Year = {'$(=Max(Year))'}>}Sales)
But now I do not have a Year field in my data. I only have a Date field and I created 'Year' as a dimension using the formula YEAR(DATE). How would I write my formula to calculate the sum of sales for the recent year?
I tried this, but it didn't workout
=Sum ({<[Year(DATE)]={$(=max(Year(DATE)))}>} Sales)
maybe this:
Sum( if (Year(Date) = Max( total Year(Date) ), Sales ) )
Regards