Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a chart with Business Date as the Dimension and Sum([Balance]) as the Expression.
When I selcted a business date I would like to display in the chart all days up to and including the Business Date selcted or the previous x number of days.
Hi,
When you want to calculate previous day, try this formula:
SUM({$<[Business Date]={$(='"='&DATE(MAX([Business Date]-1))&'"')}>} [Cr Balance])
And if you want to calculate previous 5 days:
SUM({$<[Business Date]={$(='">='&DATE(MAX([Business Date]-5))&'<='&DATE(MAX([Business Date]))&'"')}>} [Cr Balance])
Milda
Hi,
if you want so see all dates until the selected one, you can use Set analysis in expression:
SUM({$<[Business Date]={$(='"<='&DATE(MAX([Business Date]))&'"')}>} [Balance])
Milda
Thanks that is great. I am also trying to bring back the balance for the previous day.
I have the following formula, but it keeps returning the value of the date slected.
SUM({$<[Business Date]={$(='"='&DATE(([Business Date]-1))&'"')}>} [Cr Balance])
How would I do this if I wanted it between two dates. i.e. Business dates and the previous 5 days?
Hi,
When you want to calculate previous day, try this formula:
SUM({$<[Business Date]={$(='"='&DATE(MAX([Business Date]-1))&'"')}>} [Cr Balance])
And if you want to calculate previous 5 days:
SUM({$<[Business Date]={$(='">='&DATE(MAX([Business Date]-5))&'<='&DATE(MAX([Business Date]))&'"')}>} [Cr Balance])
Milda
Thanks Milda. That is great. I managed to figure out the previous days calculation myself, but the code for the range is great. I am reasonably new to Qlickview and wonder if I use variables if this will run any quicker.
For example I can have a variable call vPrevious day which will be DATE(MAX([Business Date]-1))
Would this make the calculations any quicker?
Thanks for all your help.
Thanks Milda. That is great. I managed to figure out the previous days calculation myself, but the code for the range is great. I am reasonably new to Qlickview and wonder if I use variables if this will run any quicker.
For example I can have a variable call vPrevious day which will be DATE(MAX([Business Date]-1))
Would this make the calculations any quicker?
Thanks for all your help.
Thanks Milda. That is great. I managed to figure out the previous days calculation myself, but the code for the range is great. I am reasonably new to Qlickview and wonder if I use variables if this will run any quicker.
For example I can have a variable call vPrevious day which will be DATE(MAX([Business Date]-1))
Would this make the calculations any quicker?
Thanks for all your help.
Thanks Milda. That is great. I managed to figure out the previous days calculation myself, but the code for the range is great. I am reasonably new to Qlickview and wonder if I use variables if this will run any quicker.
For example I can have a variable call vPrevious day which will be DATE(MAX([Business Date]-1))
Would this make the calculations any quicker?
Thanks for all your help.
Hi,
you can try to use variable. But I don't think that it will be noticeably quicker.
Milda