Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Quick Set Analysis help....

...Hi all,

Can someone help me by putting the following into some set analysis please?

I've been strugglnig with this all day and I'm officially stuck;

I would like to sum the field FUMValue where the RetMonthName and AUMMonthName are the same, these are how I've calculated the two month fields;

RetMonthName = MonthName(AddMonths([retired date]),-2))

AUMMonthName = MonthName(MonthYear)

I'm struggling with adapting the above to work within set analysis as I don't want to actually create the fields separately, can someone please help?

Kind Regards,

2 Replies
mato32188
Specialist
Specialist

Hi Samuel,

create a flag in script: if(RetMonthName = AUMMonthName, 1, 0) as @MonthEq

then

sum({<@MonthEq = {'1'}>}FUMValue)

BR

M

ECG line chart is the most important visualization in your life.
JonnyPoole
Former Employee
Former Employee

You can do it but you need a field context... for which field values are you making this comparison ? 

If it was for a ProductID for example use the SEARCH syntax (double quotes) with a preceding '=' sign before the condition. 

count( {$<ProductID={"=(MonthName(AddMonths([retired date]),-2)))=MonthName(MonthYear)"}>} ProductID)