Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
juriengroot
Contributor III
Contributor III

Use calculated value into new calculation

To create a forecasted revenue I have the following calculation.

num(SUM({1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today()))"}>}[Revenue])

/ SUM({1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today())-1)"}>}[Revenue])-1,'#,##0.0%')

This gives a ratio of this year YTD revenue vs last year YTD revenue. Now I want to use that ratio into a calculation about 2016.

Say [actual revenue] *

num(SUM({1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today()))"}>}[Revenue])

/ SUM({1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today())-1)"}>}[Revenue])-1,'#,##0.0%')

However, if I plot this in a table with a year dimension I get nothing.

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

[actual revenue] *

If(Year = 2016, Num(Sum(TOTAL {1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today()))"}>}[Revenue])/Sum(TOTAL {1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today())-1)"}>}[Revenue])-1, 1),'#,##0.0%')

I have used a static condition of Year = 2016, but you need to determine a more advanced condition for what determines a forecast here?

View solution in original post

3 Replies
sunny_talwar

May be try this:

[actual revenue] *

If(Year = 2016, Num(Sum(TOTAL {1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today()))"}>}[Revenue])/Sum(TOTAL {1<MonthNum ={"<=$(=Num(Month(Today())))"}, Year={"$(=Year(Today())-1)"}>}[Revenue])-1, 1),'#,##0.0%')

I have used a static condition of Year = 2016, but you need to determine a more advanced condition for what determines a forecast here?

juriengroot
Contributor III
Contributor III
Author

Thanks! The Total was the key here!

sunny_talwar

Indeed it was