Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fiscal Year to get YTD Aggregates

Hi

Sorry i'm new to Qlikview so this maybe a very simple question.

I currently have a dashboard which shows Month by Month data for Premiums. What i would like to do is if for instance you picked Aug 2010 it would show the Monthly total of Premium for August and then in the next column (i'm using a Pivot Table) a total YTD Total for the Fiscal Year so far. Out Fiscal Year runs from July to June. I've managed to get the total for Aug ok but i'm having trouble totaling the YTD Total. I keep getting the full year rather than the year up to the maximum of the month selected.

Any help would be greatly appreciated.

Thanks

Chris

5 Replies
Not applicable
Author

Hi,

If i understood your question, below would is the code for you problem

=sum({<Fin_Year = {$(=Yearname(Max(TransDate),0,7))},Month = {'<=$(=Month(Max(TransDate)))'}>} SalesAmount)

Hope this will help you.

- Sridhar

Not applicable
Author

Hi,

you can use this expression.... for ytd i hope u can change fields and variable according to your requirement.

YTD....

=NUM(Sum({$<[YearName]={'$(vCY)'},YearMonth={"<=$(vCurrentYearMonth)"},MonthName= ,Source={'Disbursemnet'}>} DISBURSED_AMT),'#,##0')

Current Month

=NUM(Sum({$<[YearName]={'$(vCY)'},YearMonth={"<=$(vCurrentYearMonth)"},month={"$(vCM)"},Source={'Disbursemnet'}>} DISBURSED_AMT),'#,##0')

I Hope u can make these variables vCY And vLY AND Currentyear month and previousyearmonth by using max of year or max of month ........ in variable overview tab.......

Regards,

Dushyant





Not applicable
Author

Hi Dushyant,

I saw your post and created the variables vCurrYear for current year as max of year, vCurrMonth for current month as max of month and vCurrYearMonth as YYYY MMM. Then i used the expression

NUM(Sum({$<[YEAR]={'$(vCurrYear)'},YearMonth={"<=$(vCurrentYearMonth)"},MONTH=,PLACED_ORDER_COUNT),'#,##0')

This is giving an error as bad expression. I need the year to current month data for placed order count. What I have right now is the month by month data. Can you help me out with this? Also, can you tell me why the variable currentyearmonth is needed and what is the desired format for it?

Thank you.

Regards

Kumar



Not applicable
Author

Hi...

Can you give an example of how the YTD aggregates are done in qlikview? I am still getting just the monthly data.

Regards

Kumar

Not applicable
Author

Hi Kumar,

Please find out YTD Example doc attached and see variable created and their use in expression.I am sure you can get your result by this way .

Just see this application and apply few changes according to your result.......

Regards,

Dushyant