Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a chart (straight table) that shows KPIs by month. However one of the KPIs is really a quarterly measure, I need help displaying this on the table.
There is a binary flag for each month of data and I need it sum by month over the quarter. For example:
Jan - 2
Feb - 3
Mar - 5
The chart would show: Jan - 2 | Feb - 5 | Mar - 10 |
Then start back at 0 for April... also when Mar is selected I would like to see 10 instead of 5.
Thanks!
It looks like you need to calculate a running total. If you want to do it in the script, use functions peek() and previous() to accumulate the running quarterly total for each of your data entities. There is a wiki page describing it:
(I think I quoted it 5 times in the last 2 days - seems to be a very popular topic)
Sorry, but I don't see how to use this as an answer to my issue. I thought I could do it with a calculation rather than in the load...
Depending on the size of your data, it may or may not be possible...
Actually, as I was typing, an interesting thought occurred to me... If you add Quarter as a hidden dimension to your Monthly chart, you can then use TOTAL <Quarter> to accumulate quarterly numbers:
sum( TOTAL <Quarter> MyValue)
The only requirement is that Quarter is one of the chart dimensions, even if it's hidden.