Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zied_ahmed1
Specialist
Specialist

problem with set analysis

Hello,

I would lik when i select a Month i will have the sum of CAT from the start of year to Month selected :

For example if i select April i will do sum of January,February,March,April of sum (Sales)

Thanks for help

7 Replies
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Zied,

Your Set analysis may be like below:

Sum({<Date={'>= $(=YearStart(max(Date))) <= $(=max(Date))'},Month=>}Sales)


Thanks,

Arvind Patil

shraddha_g
Partner - Master III
Partner - Master III

try this,

sum({<Date = {">=$(=date(Yearstart(Max(Date))))<=$(=Date(max(Date)))"},Month=>}CAT)

zied_ahmed1
Specialist
Specialist
Author

Hello,

I will explain more the requirement :

If I select June i will have the sum Sales of A16-06 (06 is the June ) and 05 and 06 of the field CAT

exp2.png

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Zied,

At the time of selection of month june  your max date is jun 18.

sum({<Date = {">=$(=date(Yearstart(Max(Date))))<=$(=Date(max(Date)))"},Month=>}CAT)


Yearstart gives you from jan to june.


Thanks,

Arvind patil

shraddha_g
Partner - Master III
Partner - Master III

what is the year in this case?

Create a date field and then use that set expression mentioned in previous comment.

balabhaskarqlik

May be this:

Sum({<Month = {"$(='>=1<=' & Num(Month(Max({1}Date))))"}, Year>} Sales)