you may only be missing or misplaced the = equal in your expansion. You can do this by inserting = prefix prior to the variable during load Also Sunny is right about needing the Date function to format as a date result
set vCurrentMonthYear = Date(Max(CallMonthYear));
The problem is that the statement
set vCurrentMonthYear = Max(CallMonthYear);
creates variable in the integer format - because of max(), while the CallMonthYear field has format 'MM/YYYY'. In set modifier, format must match. So, you can either change definition of the variable (as per stalwar1, or explicitly define format in set.
I think the issue is with the Date format, when you use Max() it will return date in number format, so you have to use Date() to convert to the required format
set vCurrentMonthYear =Date(Max(CallMonthYear), 'MM/YYYY');
set vPriorMonthYear = AddMonths(Max(CallMonthYear), -1);
KPI Express (this one does not work):
Hope this helps you.
Thank you all for your responses and you might be 100% correct, but I've tried different formatting for the variables and source data with no luck. I've created a very simple Qlik Sense application to demonstrate my issue. The app performs an inline load of 7 records, defines 2 variables, and the sheet displays the contents of the data, variables and contains a few aggregations with some set analysis. I have labeled the KPIs with the expect results.
Again, thank you for any insights you can provide!