This content has been marked as final. Show 3 replies
Initially, I have a bar chart displaying the Sales (measure) per Country (dimension) in 2016 and the following two filters:
* Week: it contains number from 1 to 52 (referring the number of weeks of 2016).
* Period: it's a new field created in the data load editor. It can be equal to "Weekly" or "YTD".
Each of them can take only value at a time. Obviously, the data displayed by the bar chart changes every time we select a different week.
If Period is equal to "Weekly", I want to display the Sales per Country for the selected week. This works! Additionally, if Period is equal to "YTD", I would like to display the acumulative Sales (from first week to the selected week) per Country. Unfortunately, I'm having problems with the second part (Period equal to 'YTD').
Please find below the code for the measure of the bar chart typed up to the moment. I think the issue might be in the red highlighted part.
IF([Period] = 'YTD', RangeSum(above(Sum([Sales]),0,[Week])), Sum([Sales])
Thank you very much in advance. I would really appreciate if anyone could help me solve this issue.