Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following dimension and expression
Dimension = Quarter
Expression = Revenue in $
The actual values are as follows
Q1 2014 = $100
Q2 2014 = $250
Q3 2014 = $375
Q4 2014 = $500
The Quarter is also a part of a multi box selection.
I want to get year to date (YTD) values based on the quarter selected as follows
When Quarter selected = Q1
2014 YTD = Q1 Revenue = $100
When Quarter selected = Q2
2014 YTD = Q1 Revenue + Q2 Revenue = $350
When Quarter selected = Q3
2014 YTD = Q1 Revenue + Q2 Revenue + Q3 Revenue = $725
When Quarter selected = Q4
2014 YTD = Q1 Revenue + Q2 Revenue + Q3 Revenue + Q4 Revenue = $1,225
Much appreciated,
CD
Hi Chiranjiv,
Since you want to group the cumulative sum based on year, product and quarter, you will have to derive the year field or use it if it already exists
PFA app. Here I have added an additional field - Year
Thanks,
Manisha
Create a sample qvw and upload here. That would reduce no. of assumptions we have to make; you would be helped faster.
Attached is the QV. I am looking for the following outcome
Your quarters are strings. Create them in the script using proper date functions like QuarterName() or using dual() along with string so that it can be compared (having a numeric representation at the backend) in the front end expression using date functions or in set analysis.
Hi Chiranjiv,
PFA file and check if this serves your purpose
Thanks,
Manisha
Manisha,
Your solution works, but I may have oversimplified the data. Attached is how my data really looks like and this is the outcome I am expecting
Hi Chiranjiv,
Since you want to group the cumulative sum based on year, product and quarter, you will have to derive the year field or use it if it already exists
PFA app. Here I have added an additional field - Year
Thanks,
Manisha
Thanks, Manisha. This is awesome.