Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have attempted to apply this Outer Set expression for a KPI:
{<Expense = {Fixed}>} [Spend>2023]
It returns the value for [Spend 2023], but not the value limited by the outer set.
[Spend>2023] is a Master Item and defined as follows:
Sum({$<Type ={debit}, Category -= {$(ExcludedCategories)}, Year = {2023,2024}>} Amount)
ExcludedCategories is defined as follows in the load script:
SET ExcludedCategories = 'Transfer','Account Transfer','Credit Card Payment', 'Payment', 'Withdrawal', 'Investments', 'Extraordinary';
Insertion of {<Expense = {Fixed}>}, as follows, in the Master Item expression works fine:
Sum({$<Type ={debit}, Category -= {$(ExcludedCategories)}, Expense = {Fixed}, Year = {2023,2024}>} Amount)
What is wrong with the attempted Outer Set expression? Any help is much appreciated.
remove the $ identifier from your master measure; this is not required and also the reason why the context set is not being inherited
Sum({$<Type ={debit}, Category -= {$(ExcludedCategories)}, Expense = {Fixed}, Year = {2023,2024}>} Amount)
Change to
Sum({<Type ={debit}, Category -= {$(ExcludedCategories)}, Expense = {Fixed}, Year = {2023,2024}>} Amount)
refer point no 1
If an aggregation function already contains a set expression, this will be merged with the context. The same merging rules as today will apply:
https://community.qlik.com/t5/Design/New-Set-Analysis-syntax/ba-p/1983110
remove the $ identifier from your master measure; this is not required and also the reason why the context set is not being inherited
Sum({$<Type ={debit}, Category -= {$(ExcludedCategories)}, Expense = {Fixed}, Year = {2023,2024}>} Amount)
Change to
Sum({<Type ={debit}, Category -= {$(ExcludedCategories)}, Expense = {Fixed}, Year = {2023,2024}>} Amount)
refer point no 1
If an aggregation function already contains a set expression, this will be merged with the context. The same merging rules as today will apply:
https://community.qlik.com/t5/Design/New-Set-Analysis-syntax/ba-p/1983110
that solved it, thanks, Vineeth