Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
rajni_batra
Specialist
Specialist

Max year max month

hello m using this expression getting result for max year but max month only on selection..

i have to use it on dashboard so cant use selection there..

what should i use there tried only() also

sum({<[CAL.Fiscal Year]={$(=MaxFiscalYearGL)},[CAL.Fiscal Month]={"=$(=max([CAL.Fiscal Month Num]))"}, BSubHead = {'CURRENT ASSETS'}>}[Closing Balance])

Labels (1)
1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=sum({$<[Fiscal Year] = {$(MaxFiscalYear),$(=Max([Fiscal Year])-1)}, [Fiscal Month] = {"$(=Month(max([Link Date])))"}, BSubHead = {'CURRENT ASSETS'}>}[Closing Balance])

Let me know this is what you required.

Regards,

Jagan.

View solution in original post

19 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=sum({<[CAL.Fiscal Year]={$(=Year(Max(YourDateDimensionName))},[CAL.Fiscal Month]={"=$(=Month(max(YourDateDimensionName)))"}, BSubHead = {'CURRENT ASSETS'}>}[Closing Balance])

Hope this helps you.

Regards,

Jagan.

adhudson
Creator II
Creator II

Hi,

     Give a try with the below expression.

    

     You may need to # or single quotes while using variables and expressions in set analysis.

     sum({<[CAL.Fiscal Year]={'$(#=MaxFiscalYearGL)'},[CAL.Fiscal Month]={'=$(#=max([CAL.Fiscal Month Num]))'}, BSubHead = {'CURRENT ASSETS'}>}[Closing Balance])

Regards

Andrew Hudson

rajni_batra
Specialist
Specialist
Author

hi andrew...

giving the same result

rajni_batra
Specialist
Specialist
Author

Helo jagan,

actualy the problem is i have only calender date but here i need to work on fiscal terms derived fiscal month n year.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Can you post some sample data or file you are working.

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with this

     sum({<[CAL.Fiscal Year]={$(=Max({1} [CAL.Fiscal Year]))},[CAL.Fiscal Month]={"=$(=max([CAL.Fiscal Month Num]))"}, BSubHead = {'CURRENT ASSETS'}>}[Closing Balance])

Celambarasan

rajni_batra
Specialist
Specialist
Author

same output as before

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     you mentioned Max month only on selection that means?If not selected what type of output you need to get?

Celambarasan

rajni_batra
Specialist
Specialist
Author

current year current month

previous year current month

on dashboard without any selection