Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
i tried to work to calculate the sum(amount_pg) between the two dates in calendar choices (with Date range picker) . but when i modify the date filters , any modification for the the sum amount is maked to satisfy the conditions.
Any help please for a nice practice , method , extension to calculate sum based on dates condition ( i tried many but don't find the solution yet)
Have you inserted if condition properly?
=Sum(if(date>=calendarObject1 and date <=calendarObject1,amount_pg))
=Sum(if(date>=calendarObject1 and date <=calendarObject1,amount_pg))
date (is my date of course) but what do you mean by calendarObject1 : is undifined for Qlik sense and i should correct my syntax. So , the problem how to set the two dates in choice into 2 variables ? this is what we need : sur a simple configuration we must do it ? any help
I meant startDate and endDate which you used for calendar,
=Sum(if(date>=vStartDate and date <=vEndDate,amount_pg))
//date - your database date
//vStartDate and vEndDate are variables which you have used in calendars
As Vitalii suggested, you can also use set analysis for that,
=sum({<Date = {">=$(vStartDate )<=$(vEndDate)"}>}amount_pg)
Thanks for your answer but I still having problem : i make this configuration to the date range picker and my text with measure . DATFCH : date orders / MNTFCH : amount orders
But i still having the same amount 😞
to understand me more : i need to calculate my sum(MNTFCH) dynamically , based on the dates in filter from the date range picker (or other extension object , the essential : finding solution)