Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sona_sa
Creator II
Creator II

Set Analysis Expression Help

Hi Friends,


I have an expression which is: If(([P&L Level] = 's' or IsAdjustment = '1'), ,Sum({Period_1<CompanyName=$::CompanyName>}($(OpenBalanceExpression)))

Now I have to add a condition i.e.:


{$<MonthNum= {$(vMinMonth)}>}


How I can implement the same in my expression?


Thanks.

3 Replies
tresesco
MVP
MVP

If the state is same, try like:

If(([P&L Level] = 's' or IsAdjustment = '1'), ,Sum({Period_1<MonthNum= {$(vMinMonth)}, CompanyName=$::CompanyName>}.....

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Your example has syntax errors, so I am not sure exactly what you want:

If(([P&L Level] = 's' or IsAdjustment = '1'), Sum({$<MonthNum = {$(=vMinMonth)}> * Period_1<CompanyName=$::CompanyName>} ($(OpenBalanceExpression))))

or possibly

If(([P&L Level] = 's' or IsAdjustment = '1'), 0, Sum({$<MonthNum = {$(=vMinMonth)}> * Period_1<CompanyName=$::CompanyName>} ($(OpenBalanceExpression))))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sona_sa
Creator II
Creator II
Author

Hi Jonathan,


Thanks....

I have used the same expression. But it is giving the output 0. But There is +ve and -ve values are there in database.

For ref. Please check the Table I have provided there in QVW. Also please find the attached qvw for more ref.


Thanks again for reply.