Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm stuck here. Any suggestions? Trying to create a R12 based on the guide here:
The Magic of Set Analysis – Point In Time Reporting | iQlik - Everything QlikView.
This works fine getting previous months, any month:
=SUM
(
{$<
MC_YearMonthID={$(=Max(MC_YearMonthID)-1)},
MC_Year=,
MC_Quarter=,
MC_Month=,
MC_YearMonthDate=
>}
Sales
)
A YTD calculation as well:
=SUM
(
{$<
MC_YearMonthID={"<=$(=Max(MC_YearMonthID))"},
MC_Year = {$(=Max(MC_Year))},
MC_Quarter=,
MC_Month=,
MC_Week=,
MC_YearMonthDate=
>}
Sales
)
But this R12 gives me far to small numbers:
=SUM
(
{$<
MC_YearMonthID={">=$(=Max(MC_YearMonthID)–11)<=$(=Max(MC_YearMonthID))"},
MC_Year=,
MC_Quarter=,
MC_Month=,
MC_Week=,
MC_YearMonthDate=
>}
Sales
)
Anybody that sees any syntax problems?
I use a master calendar with:
TempDate As MC_YearMonthDate,
Week(TempDate) As MC_Week,
Year(TempDate) As MC_Year,
Month(TempDate) As MC_Month,
ApplyMap('QuartersMap', month(TempDate), Null()) as MC_Quarter,
(Year(TempDate)-1)*12+Num(Month(TempDate)) as MC_YearMonthID
I now get correct R12 numbers for full year, like 2013.
For 2014 it does not work.
Also, I get correct number in a text box but when splitting over months numbers also split - how to get correct R12 in a year table with month as dimension?
I couldn't down-size the application so I have added it as a DropBox download.
https://www.dropbox.com/s/4yaf6we4ispfue0/FsgAnalys%20-%20Test%20R12%20Sample.zip
Can you reduce?
Yes, here it is.
The figure 2417588,17189 that you see in your text box (that says, 'R12Sales Working') is actually, 2417588.17189.
Your decimal separator is ',' (comma), you can correct it in number tab. Does it clarify? Or, am I missing something?
Thank you for your answer.
No, the number is correct as an R12 for 2014 december. It is here my problem is - I have a 'full' year from my linked table no matter what year I look at. It is the way this application was designed once. So max('2014') is december. I need to handle current year in my R12 so that I have a 'max' month as current month if year is current year. Does this makes sense?
Second problem is something different. If I use set analysis as above for R12 in a text box for any month in 2013 or earlier I do get a correct R12. But when using month as dimension in a chart box they are split. Please see qvw-file. How do I get a correct R12 here?