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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

how to get the sum of first month till selected month in qlikview with example

how to get the sum of first month till selected month in qlikview with example

Regards,

Karim Khan

KK
15 Replies
sunny_talwar

May be this:

{<Date = {"$(='>=' & Date(Min({1}Date), 'YourDateFormat') & '<=' & Date(Max(Date), 'YourDateFormat'))"}>}

This will give you the result for all dates between Minimum date in your database and the selected Date.

Karim_Khan
Creator III
Creator III
Author

But Sir My scenario is like that

Whenever I click on selected Month It Should some the Data from First Fiscal Month Till Selected Month

My Fiscal Month IS starting from Aug.

As per your Expression

=sum({<Date = {"$(='>=' & Date(Min({1}Date), 'DD-MM-YYYY') & '<=' & Date(Max(Date), 'DD-MM-YYYY'))"}>}[Net Bookings])

Total values is not getting correctly

Pls help I would be very thankfull

KK
sunny_talwar

Try this may be:

=Sum{<Date = {"$(='>=' & Date(YearStart(Max(Date), 0, 8), 'DD-MM-YYYY') & '<=' & Date(Max(Date), 'DD-MM-YYYY'))"}>} [New Bookings])

Karim_Khan
Creator III
Creator III
Author

Thanks for your help but it is taking the data on Date basis like

01-08-2014 to 01-03-2015

can we do it as Aug and March Month directly instead of Date Basis.

Like

>=Aug<=Mar

KK
sunny_talwar

What about this?

=Sum{<Date = {"$(='>=' & Date(YearStart(Max(Date), 0, 8), 'DD-MM-YYYY') & '<=' & Date(MonthEnd(Max(Date)), 'DD-MM-YYYY'))"}>} [New Bookings])

Here monthend will include the whole month of March in your given case. We can use Month-Year Field if you one available. (Created using MonthName() function in the script)

Karim_Khan
Creator III
Creator III
Author

Like I want for Same Year 2015 only

KK
Karim_Khan
Creator III
Creator III
Author

But If I Want to Take the Field from 01-Aug-2015 then it will work with this

KK
sunny_talwar

Not sure what you mean brother

Karim_Khan
Creator III
Creator III
Author

I am trying to put below expression

=sum({<[FiscalMonthName]={"$(='>=' & vBeg'<=' & vLast"}>}[Net Bookings])

vBeg=Month(YearStart(Max(Date), 0, 8))

vLast=Month(YearStart(Max(Date), 0, 7))


But Not Working

KK